Hello community,
here is the log from the commit of package python3-pytest-cov for
openSUSE:Factory checked in at 2016-10-22 13:00:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-pytest-cov (Old)
and /work/SRC/openSUSE:Factory/.python3-pytest-cov.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-pytest-cov"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-pytest-cov/python3-pytest-cov.changes
2016-08-25 09:50:27.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.python3-pytest-cov.new/python3-pytest-cov.changes
2016-10-22 13:00:57.000000000 +0200
@@ -1,0 +2,11 @@
+Wed Oct 12 02:16:31 UTC 2016 - [email protected]
+
+- update to version 2.4.0:
+ * Added a "disarm" option: --no-cov. It will disable coverage
+ measurements. Contributed by Zoltan Kozma in PR#135.
+ WARNING: Do not put this in your configuration files, it's meant
+ to be an one-off for situations where you want to disable coverage
+ from command line.
+ * Fixed broken exception handling on .pth file. See #136.
+
+-------------------------------------------------------------------
Old:
----
pytest-cov-2.3.1.tar.gz
New:
----
pytest-cov-2.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-pytest-cov.spec ++++++
--- /var/tmp/diff_new_pack.GB9aVu/_old 2016-10-22 13:00:58.000000000 +0200
+++ /var/tmp/diff_new_pack.GB9aVu/_new 2016-10-22 13:00:58.000000000 +0200
@@ -17,7 +17,7 @@
Name: python3-pytest-cov
-Version: 2.3.1
+Version: 2.4.0
Release: 0
Summary: Pytest plugin for coverage reporting
License: MIT
++++++ pytest-cov-2.3.1.tar.gz -> pytest-cov-2.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/.bumpversion.cfg
new/pytest-cov-2.4.0/.bumpversion.cfg
--- old/pytest-cov-2.3.1/.bumpversion.cfg 2016-08-07 22:09:52.000000000
+0200
+++ new/pytest-cov-2.4.0/.bumpversion.cfg 2016-10-10 21:31:18.000000000
+0200
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 2.3.1
+current_version = 2.4.0
commit = True
tag = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/CHANGELOG.rst
new/pytest-cov-2.4.0/CHANGELOG.rst
--- old/pytest-cov-2.3.1/CHANGELOG.rst 2016-08-07 16:46:41.000000000 +0200
+++ new/pytest-cov-2.4.0/CHANGELOG.rst 2016-10-10 02:03:37.000000000 +0200
@@ -1,6 +1,16 @@
Changelog
=========
+2.4.0 (2016-10-10)
+------------------
+
+* Added a "disarm" option: ``--no-cov``. It will disable coverage
measurements. Contributed by Zoltan Kozma in
+ `PR#135 <https://github.com/pytest-dev/pytest-cov/pull/135>`_.
+
+ **WARNING: Do not put this in your configuration files, it's meant to be an
one-off for situations where you want to
+ disable coverage from command line.**
+* Fixed broken exception handling on ``.pth`` file. See `#136
<https://github.com/pytest-dev/pytest-cov/issues/136>`_.
+
2.3.1 (2016-08-07)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/PKG-INFO
new/pytest-cov-2.4.0/PKG-INFO
--- old/pytest-cov-2.3.1/PKG-INFO 2016-08-07 22:10:37.000000000 +0200
+++ new/pytest-cov-2.4.0/PKG-INFO 2016-10-10 21:31:55.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-cov
-Version: 2.3.1
+Version: 2.4.0
Summary: Pytest plugin for measuring coverage.
Home-page: https://github.com/pytest-dev/pytest-cov
Author: Marc Schlaich
@@ -320,6 +320,19 @@
do normal site initialisation so that the environment variables can be
detected and coverage
started.
+ Coverage and debuggers
+ ----------------------
+
+ When it comes to TDD one obviously would like to debug tests.
Debuggers in Python use mostly the sys.settrace function
+ to gain access to context. Coverage uses the same technique to get
access to the lines executed. Coverage does not play
+ well with other tracers simultaneously running. This manifests itself
in behaviour that PyCharm might not hit a
+ breakpoint no matter what the user does. Since it is common practice
to have coverage configuration in the pytest.ini
+ file and pytest does not support removeopts or similar the `--no-cov`
flag can disable coverage completely.
+
+ At the reporting part a warning message will show on screen
+
+ Coverage disabled via --no-cov switch!
+
Acknowledgements
================
@@ -340,6 +353,16 @@
Changelog
=========
+ 2.4.0 (2016-10-10)
+ ------------------
+
+ * Added a "disarm" option: ``--no-cov``. It will disable coverage
measurements. Contributed by Zoltan Kozma in
+ `PR#135 <https://github.com/pytest-dev/pytest-cov/pull/135>`_.
+
+ **WARNING: Do not put this in your configuration files, it's meant
to be an one-off for situations where you want to
+ disable coverage from command line.**
+ * Fixed broken exception handling on ``.pth`` file. See `#136
<https://github.com/pytest-dev/pytest-cov/issues/136>`_.
+
2.3.1 (2016-08-07)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/README.rst
new/pytest-cov-2.4.0/README.rst
--- old/pytest-cov-2.3.1/README.rst 2016-06-20 22:00:36.000000000 +0200
+++ new/pytest-cov-2.4.0/README.rst 2016-10-10 02:03:37.000000000 +0200
@@ -312,6 +312,19 @@
do normal site initialisation so that the environment variables can be
detected and coverage
started.
+Coverage and debuggers
+----------------------
+
+When it comes to TDD one obviously would like to debug tests. Debuggers in
Python use mostly the sys.settrace function
+to gain access to context. Coverage uses the same technique to get access to
the lines executed. Coverage does not play
+well with other tracers simultaneously running. This manifests itself in
behaviour that PyCharm might not hit a
+breakpoint no matter what the user does. Since it is common practice to have
coverage configuration in the pytest.ini
+file and pytest does not support removeopts or similar the `--no-cov` flag can
disable coverage completely.
+
+At the reporting part a warning message will show on screen
+
+ Coverage disabled via --no-cov switch!
+
Acknowledgements
================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/docs/conf.py
new/pytest-cov-2.4.0/docs/conf.py
--- old/pytest-cov-2.3.1/docs/conf.py 2016-08-07 22:09:52.000000000 +0200
+++ new/pytest-cov-2.4.0/docs/conf.py 2016-10-10 21:31:18.000000000 +0200
@@ -25,7 +25,7 @@
year = '2016'
author = 'pytest-cov contributors'
copyright = '{0}, {1}'.format(year, author)
-version = release = '2.3.1'
+version = release = '2.4.0'
pygments_style = 'trac'
templates_path = ['.']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/setup.py
new/pytest-cov-2.4.0/setup.py
--- old/pytest-cov-2.3.1/setup.py 2016-08-07 22:09:52.000000000 +0200
+++ new/pytest-cov-2.4.0/setup.py 2016-10-10 21:31:18.000000000 +0200
@@ -82,7 +82,7 @@
setup(
name='pytest-cov',
- version='2.3.1',
+ version='2.4.0',
license='MIT',
description='Pytest plugin for measuring coverage.',
long_description='%s\n%s' % (read('README.rst'),
re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst'))),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/src/pytest-cov.embed
new/pytest-cov-2.4.0/src/pytest-cov.embed
--- old/pytest-cov-2.3.1/src/pytest-cov.embed 2015-08-30 01:43:36.000000000
+0200
+++ new/pytest-cov-2.4.0/src/pytest-cov.embed 2016-10-10 02:03:37.000000000
+0200
@@ -2,7 +2,7 @@
try:
from pytest_cov.embed import init
init()
- except ImportError:
+ except ImportError as exc:
sys.stderr.write(
"Failed to setup coverage."
"Sources: {[COV_CORE_SOURCE]!r}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/src/pytest-cov.pth
new/pytest-cov-2.4.0/src/pytest-cov.pth
--- old/pytest-cov-2.3.1/src/pytest-cov.pth 2015-08-30 01:43:36.000000000
+0200
+++ new/pytest-cov-2.4.0/src/pytest-cov.pth 2016-10-10 02:03:37.000000000
+0200
@@ -1 +1 @@
-import os, sys;exec('if \'COV_CORE_SOURCE\' in os.environ:\n try:\n from
pytest_cov.embed import init\n init()\n except ImportError:\n
sys.stderr.write(\n "Failed to setup coverage."\n "Sources:
{[COV_CORE_SOURCE]!r}"\n "Config: {[COV_CORE_CONFIG]!r}"\n "Exception:
{!r}\\n".format(os.environ, exc))\n')
+import os, sys;exec('if \'COV_CORE_SOURCE\' in os.environ:\n try:\n from
pytest_cov.embed import init\n init()\n except ImportError as exc:\n
sys.stderr.write(\n "Failed to setup coverage."\n "Sources:
{[COV_CORE_SOURCE]!r}"\n "Config: {[COV_CORE_CONFIG]!r}"\n "Exception:
{!r}\\n".format(os.environ, exc))\n')
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/src/pytest_cov/__init__.py
new/pytest-cov-2.4.0/src/pytest_cov/__init__.py
--- old/pytest-cov-2.3.1/src/pytest_cov/__init__.py 2016-08-07
22:09:52.000000000 +0200
+++ new/pytest-cov-2.4.0/src/pytest_cov/__init__.py 2016-10-10
21:31:18.000000000 +0200
@@ -1 +1 @@
-__version__ = "2.3.1"
+__version__ = "2.4.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/src/pytest_cov/plugin.py
new/pytest-cov-2.4.0/src/pytest_cov/plugin.py
--- old/pytest-cov-2.3.1/src/pytest_cov/plugin.py 2016-08-06
18:07:31.000000000 +0200
+++ new/pytest-cov-2.4.0/src/pytest_cov/plugin.py 2016-10-10
02:03:37.000000000 +0200
@@ -68,6 +68,9 @@
group.addoption('--no-cov-on-fail', action='store_true', default=False,
help='do not report coverage if test run fails, '
'default: False')
+ group.addoption('--no-cov', action='store_true', default=False,
+ help='Disable coverage report completely (useful for
debuggers) '
+ 'default: False')
group.addoption('--cov-fail-under', action='store', metavar='MIN',
type=int,
help='Fail if the total coverage is less than MIN.')
group.addoption('--cov-append', action='store_true', default=False,
@@ -131,11 +134,16 @@
self.cov_total = None
self.failed = False
self._started = False
+ self._disabled = False
self.options = options
is_dist = (getattr(options, 'numprocesses', False) or
getattr(options, 'distload', False) or
getattr(options, 'dist', 'no') != 'no')
+ if getattr(options, 'no_cov', False):
+ self._disabled = True
+ return
+
if is_dist and start:
self.start(engine.DistMaster)
elif start:
@@ -144,6 +152,7 @@
# slave is started in pytest hook
def start(self, controller_cls, config=None, nodeid=None):
+
if config is None:
# fake config option for engine
class Config(object):
@@ -170,6 +179,12 @@
def pytest_sessionstart(self, session):
"""At session start determine our implementation and delegate to it."""
+
+ if self.options.no_cov:
+ # Coverage can be disabled because it does not cooperate with
debuggers well.py
+ self._disabled = True
+ return
+
self.pid = os.getpid()
if self._is_slave(session):
nodeid = session.config.slaveinput.get('slaveid',
@@ -207,6 +222,9 @@
def pytest_runtestloop(self, session):
yield
+ if self._disabled:
+ return
+
compat_session = compat.SessionWrapper(session)
self.failed = bool(compat_session.testsfailed)
@@ -226,6 +244,11 @@
compat_session.testsfailed += 1
def pytest_terminal_summary(self, terminalreporter):
+ if self._disabled:
+ msg = 'Coverage disabled via --no-cov switch!'
+ terminalreporter.write('WARNING: %s' % msg, red=True, bold=True)
+ terminalreporter.config.warn(code='COV-U1', message=msg)
+ return
if self.cov_controller is None:
return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/src/pytest_cov.egg-info/PKG-INFO
new/pytest-cov-2.4.0/src/pytest_cov.egg-info/PKG-INFO
--- old/pytest-cov-2.3.1/src/pytest_cov.egg-info/PKG-INFO 2016-08-07
22:10:36.000000000 +0200
+++ new/pytest-cov-2.4.0/src/pytest_cov.egg-info/PKG-INFO 2016-10-10
21:31:55.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-cov
-Version: 2.3.1
+Version: 2.4.0
Summary: Pytest plugin for measuring coverage.
Home-page: https://github.com/pytest-dev/pytest-cov
Author: Marc Schlaich
@@ -320,6 +320,19 @@
do normal site initialisation so that the environment variables can be
detected and coverage
started.
+ Coverage and debuggers
+ ----------------------
+
+ When it comes to TDD one obviously would like to debug tests.
Debuggers in Python use mostly the sys.settrace function
+ to gain access to context. Coverage uses the same technique to get
access to the lines executed. Coverage does not play
+ well with other tracers simultaneously running. This manifests itself
in behaviour that PyCharm might not hit a
+ breakpoint no matter what the user does. Since it is common practice
to have coverage configuration in the pytest.ini
+ file and pytest does not support removeopts or similar the `--no-cov`
flag can disable coverage completely.
+
+ At the reporting part a warning message will show on screen
+
+ Coverage disabled via --no-cov switch!
+
Acknowledgements
================
@@ -340,6 +353,16 @@
Changelog
=========
+ 2.4.0 (2016-10-10)
+ ------------------
+
+ * Added a "disarm" option: ``--no-cov``. It will disable coverage
measurements. Contributed by Zoltan Kozma in
+ `PR#135 <https://github.com/pytest-dev/pytest-cov/pull/135>`_.
+
+ **WARNING: Do not put this in your configuration files, it's meant
to be an one-off for situations where you want to
+ disable coverage from command line.**
+ * Fixed broken exception handling on ``.pth`` file. See `#136
<https://github.com/pytest-dev/pytest-cov/issues/136>`_.
+
2.3.1 (2016-08-07)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/tests/test_pytest_cov.py
new/pytest-cov-2.4.0/tests/test_pytest_cov.py
--- old/pytest-cov-2.3.1/tests/test_pytest_cov.py 2016-08-07
21:03:13.000000000 +0200
+++ new/pytest-cov-2.4.0/tests/test_pytest_cov.py 2016-10-10
02:03:37.000000000 +0200
@@ -337,7 +337,7 @@
])
# multi-module coverage report
- assert any(line.startswith('TOTAL ') for line in result.stdout.lines[-4:])
+ assert any(line.startswith('TOTAL ') for line in result.stdout.lines)
assert result.ret == 0
@@ -420,6 +420,21 @@
result.stdout.fnmatch_lines(['*1 failed*'])
+def test_no_cov(testdir):
+ script = testdir.makepyfile(SCRIPT)
+
+ result = testdir.runpytest('-vvv',
+ '--cov=%s' % script.dirpath(),
+ '--cov-report=term-missing',
+ '--no-cov',
+ '-rw',
+ script)
+ result.stdout.fnmatch_lines_random([
+ 'WARNING: Coverage disabled via --no-cov switch!',
+ '*1 warnings*' if pytest.__version__.startswith('2.7') else
'WCOV-U1*Coverage disabled via --no-cov switch!',
+ ])
+
+
def test_cov_and_failure_report_on_fail(testdir):
script = testdir.makepyfile(SCRIPT + SCRIPT_FAIL)
@@ -428,10 +443,12 @@
'--cov-fail-under=100',
script)
- assert 'coverage: platform' in result.stdout.str()
- assert 'FAIL Required test coverage of 100% not reached' in
result.stdout.str()
- assert 'assert False' in result.stdout.str()
- result.stdout.fnmatch_lines(['*10 failed*'])
+ result.stdout.fnmatch_lines_random([
+ '*10 failed*',
+ '*coverage: platform*',
+ '*FAIL Required test coverage of 100% not reached*',
+ '*assert False*',
+ ])
def test_dist_combine_racecondition(testdir):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.3.1/tox.ini new/pytest-cov-2.4.0/tox.ini
--- old/pytest-cov-2.3.1/tox.ini 2016-08-07 16:42:32.000000000 +0200
+++ new/pytest-cov-2.4.0/tox.ini 2016-08-20 13:44:49.000000000 +0200
@@ -24,14 +24,14 @@
27: pytest==2.7.3
28: pytest==2.8.7
29: pytest==2.9.2
- 30:
https://github.com/pytest-dev/pytest/archive/ac5c39e5340d541a37266ae85d9138afcdcaab39.zip
+ 30: pytest==3.0.0
pytest-capturelog
37: coverage==3.7.1
40: coverage==4.0.3
41: coverage==4.1
42: coverage==4.2
virtualenv
- pytest-xdist==1.14
+ pytest-xdist==1.15.0
27: pytest-cache==1.0.0
process-tests==1.2.0
pip_pre = true