Hello community,

here is the log from the commit of package python3-pytest-cov for 
openSUSE:Factory checked in at 2015-01-03 22:00:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    
2014-07-31 21:51:00.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python3-pytest-cov.new/python3-pytest-cov.changes   
    2015-01-03 22:01:02.000000000 +0100
@@ -1,0 +2,21 @@
+Wed Dec 31 20:05:58 UTC 2014 - a...@gmx.de
+
+- specfile: updated url
+
+- update to version 1.8.1:
+  * do not run `assert True` in tests
+  * run tests with pypy3
+  * use tryfirst marker in load_initial_conftests
+  * pin coverage dependency
+  * naming convention in coverage changed at version 4.0a0
+
+- changes from version 1.8.0:
+  * add support to disable output
+  * increase required dependencies
+  * run coverage manually if test is in a new process
+  * prevent error if --looponfail is set
+  * set py dependency to 1.4.21 or greater
+  * Added test for --boxed.
+  * Set cov-core dependency to 1.13.0
+
+-------------------------------------------------------------------

Old:
----
  pytest-cov-1.7.0.tar.gz

New:
----
  pytest-cov-1.8.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-pytest-cov.spec ++++++
--- /var/tmp/diff_new_pack.kgxCWP/_old  2015-01-03 22:01:03.000000000 +0100
+++ /var/tmp/diff_new_pack.kgxCWP/_new  2015-01-03 22:01:03.000000000 +0100
@@ -13,25 +13,26 @@
 # published by the Open Source Initiative.
 
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
 
 
 Name:           python3-pytest-cov
-Version:        1.7.0
+Version:        1.8.1
 Release:        0
-License:        MIT
 Summary:        Pytest plugin for coverage reporting
-Url:            http://bitbucket.org/memedough/pytest-cov/overview
+License:        MIT
 Group:          Development/Languages/Python
+Url:            https://github.com/schlamar/pytest-cov
 Source:         
https://pypi.python.org/packages/source/p/pytest-cov/pytest-cov-%{version}.tar.gz
-BuildRequires:  python3-devel
-BuildRequires:  python3-setuptools
 BuildRequires:  python3-cov-core >= 1.12
+BuildRequires:  python3-devel
 BuildRequires:  python3-pytest >= 2.2.3
+BuildRequires:  python3-setuptools
 # Test requirements:
 BuildRequires:  python3-py
 BuildRequires:  python3-virtualenv
-Requires:       python3-pytest >= 2.2.3
 Requires:       python3-cov-core >= 1.12
+Requires:       python3-pytest >= 2.2.3
 BuildArch:      noarch
 
 %description

++++++ pytest-cov-1.7.0.tar.gz -> pytest-cov-1.8.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-cov-1.7.0/PKG-INFO 
new/pytest-cov-1.8.1/PKG-INFO
--- old/pytest-cov-1.7.0/PKG-INFO       2014-06-12 20:24:03.000000000 +0200
+++ new/pytest-cov-1.8.1/PKG-INFO       2014-11-06 22:40:33.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pytest-cov
-Version: 1.7.0
+Version: 1.8.1
 Summary: py.test plugin for coverage reporting with support for both 
centralised and distributed testing, including subprocesses and multiprocessing
 Home-page: https://github.com/schlamar/pytest-cov
 Author: Marc Schlaich
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-cov-1.7.0/pytest_cov.egg-info/PKG-INFO 
new/pytest-cov-1.8.1/pytest_cov.egg-info/PKG-INFO
--- old/pytest-cov-1.7.0/pytest_cov.egg-info/PKG-INFO   2014-06-12 
20:24:03.000000000 +0200
+++ new/pytest-cov-1.8.1/pytest_cov.egg-info/PKG-INFO   2014-11-06 
22:40:33.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pytest-cov
-Version: 1.7.0
+Version: 1.8.1
 Summary: py.test plugin for coverage reporting with support for both 
centralised and distributed testing, including subprocesses and multiprocessing
 Home-page: https://github.com/schlamar/pytest-cov
 Author: Marc Schlaich
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-cov-1.7.0/pytest_cov.egg-info/requires.txt 
new/pytest-cov-1.8.1/pytest_cov.egg-info/requires.txt
--- old/pytest-cov-1.7.0/pytest_cov.egg-info/requires.txt       2014-06-12 
20:24:03.000000000 +0200
+++ new/pytest-cov-1.8.1/pytest_cov.egg-info/requires.txt       2014-11-06 
22:40:33.000000000 +0100
@@ -1,2 +1,4 @@
-pytest>=2.5.2
-cov-core>=1.12
\ No newline at end of file
+py>=1.4.22
+pytest>=2.6.0
+coverage>=3.7.1,<4.0a1
+cov-core>=1.14.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-cov-1.7.0/pytest_cov.py 
new/pytest-cov-1.8.1/pytest_cov.py
--- old/pytest-cov-1.7.0/pytest_cov.py  2014-04-26 17:27:42.000000000 +0200
+++ new/pytest-cov-1.8.1/pytest_cov.py  2014-11-06 21:35:45.000000000 +0100
@@ -1,9 +1,11 @@
 """Coverage plugin for pytest."""
 
+import os
 
 import pytest
 
 import cov_core
+import cov_core_init
 
 
 def pytest_addoption(parser):
@@ -18,7 +20,7 @@
     group.addoption('--cov-report', action='append', default=[],
                     metavar='type', dest='cov_report',
                     choices=['term', 'term-missing', 'annotate', 'html',
-                             'xml'],
+                             'xml', ''],
                     help='type of report to generate: term, term-missing, '
                     'annotate, html, xml (multi-allowed)')
     group.addoption('--cov-config', action='store', default='.coveragerc',
@@ -30,7 +32,7 @@
                          'default: False')
 
 
-@pytest.mark.try_last
+@pytest.mark.tryfirst
 def pytest_load_initial_conftests(early_config, parser, args):
     ns = parser.parse_known_args(args)
     if ns.cov_source:
@@ -64,6 +66,8 @@
         """
 
         # Our implementation is unknown at this time.
+        self.pid = None
+        self.cov = None
         self.cov_controller = None
         self.failed = False
         self.options = options
@@ -97,6 +101,7 @@
 
     def pytest_sessionstart(self, session):
         """At session start determine our implementation and delegate to it."""
+        self.pid = os.getpid()
         is_slave = hasattr(session.config, 'slaveinput')
         if is_slave:
             nodeid = session.config.slaveinput.get('slaveid',
@@ -122,13 +127,27 @@
     def pytest_sessionfinish(self, session, exitstatus):
         """Delegate to our implementation."""
         self.failed = exitstatus != 0
-        self.cov_controller.finish()
+        if self.cov_controller is not None:
+            self.cov_controller.finish()
 
     def pytest_terminal_summary(self, terminalreporter):
         """Delegate to our implementation."""
+        if self.cov_controller is None:
+            return
         if not (self.failed and self.options.no_cov_on_fail):
             self.cov_controller.summary(terminalreporter._tw)
 
+    def pytest_runtest_setup(self, item):
+        if os.getpid() != self.pid:
+            # test is run in another process than session, run
+            # coverage manually
+            self.cov = cov_core_init.init()
+
+    def pytest_runtest_teardown(self, item):
+        if self.cov is not None:
+            cov_core.multiprocessing_finish(self.cov)
+            self.cov = None
+
 
 def pytest_funcarg__cov(request):
     """A pytest funcarg that provides access to the underlying coverage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-cov-1.7.0/setup.py 
new/pytest-cov-1.8.1/setup.py
--- old/pytest-cov-1.7.0/setup.py       2014-06-12 20:21:48.000000000 +0200
+++ new/pytest-cov-1.8.1/setup.py       2014-11-06 22:38:19.000000000 +0100
@@ -1,7 +1,7 @@
 import setuptools
 
 setuptools.setup(name='pytest-cov',
-                 version='1.7.0',
+                 version='1.8.1',
                  description='py.test plugin for coverage reporting with '
                  'support for both centralised and distributed testing, '
                  'including subprocesses and multiprocessing',
@@ -10,8 +10,10 @@
                  author_email='marc.schla...@gmail.com',
                  url='https://github.com/schlamar/pytest-cov',
                  py_modules=['pytest_cov'],
-                 install_requires=['pytest>=2.5.2',
-                                   'cov-core>=1.12'],
+                 install_requires=['py>=1.4.22',
+                                   'pytest>=2.6.0',
+                                   'coverage>=3.7.1,<4.0a1',
+                                   'cov-core>=1.14.0'],
                  entry_points={'pytest11': ['pytest_cov = pytest_cov']},
                  license='MIT License',
                  zip_safe=False,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-cov-1.7.0/test_pytest_cov.py 
new/pytest-cov-1.8.1/test_pytest_cov.py
--- old/pytest-cov-1.7.0/test_pytest_cov.py     2014-05-01 23:50:06.000000000 
+0200
+++ new/pytest-cov-1.8.1/test_pytest_cov.py     2014-11-06 22:36:04.000000000 
+0100
@@ -1,18 +1,3 @@
-"""Tests for pytest-cov.
-
-Known issues:
-
-- If py 2 then can have tx for any py 2, but problems if tx for py 3.
-
-- If py 3.0 then can have tx for py 3.0 / 3.1, but problems if tx for py 2.
-
-- If py 3.1 then can have tx for py 3.1, but problems if tx for py 2 or py 3.0.
-
-- For py 3.0 coverage seems to give incorrect results, it reports all
-  covered except the one line which it should have actually covered.
-  Issue reported upstream, also only problem with pass statement and
-  is fine with simple assignment statement.
-"""
 
 import os
 import sys
@@ -20,6 +5,8 @@
 import virtualenv
 
 import py
+import pytest
+import pytest_cov
 
 
 pytest_plugins = 'pytester', 'cov'
@@ -32,7 +19,8 @@
         metafunc.addcall()
 
 def test_foo():
-    assert True
+    x = True
+    assert x
     if sys.version_info[0] > 5:
         assert False
 '''
@@ -71,7 +59,7 @@
 import coverage
 
 def test_foo(cov):
-    assert isinstance(cov, coverage.control.coverage)
+    assert isinstance(cov, coverage.coverage)
 '''
 
 SCRIPT_FUNCARG_NOT_ACTIVE = '''
@@ -99,7 +87,7 @@
 
 '''
 
-SCRIPT_RESULT = '8 * 88%'
+SCRIPT_RESULT = '9 * 89%'
 CHILD_SCRIPT_RESULT = '6 * 100%'
 PARENT_SCRIPT_RESULT = '8 * 100%'
 
@@ -339,7 +327,8 @@
 BASIC_TEST = '''
 
 def test_basic():
-    assert True
+    x = True
+    assert x
 
 '''
 
@@ -386,11 +375,12 @@
     raise NotImplementedError
 
 def test_basic():
-    assert True
+    x = True
+    assert x
 
 '''
 
-EXCLUDED_RESULT = '3 * 100% *'
+EXCLUDED_RESULT = '4 * 100% *'
 
 
 def test_coveragerc(testdir):
@@ -436,3 +426,38 @@
                                '--cov-report=term-missing',
                                script)
     assert result.ret == 0
+
+
+SCRIPT_SIMPLE = '''
+
+def test_foo():
+    assert 1 == 1
+    x = True
+    assert x
+
+'''
+
+SCRIPT_SIMPLE_RESULT = '4 * 100%'
+
+
+@pytest.mark.skipif('sys.platform == "win32"')
+def test_dist_boxed(testdir):
+    script = testdir.makepyfile(SCRIPT_SIMPLE)
+
+    result = testdir.runpytest('-v',
+                               '--cov=%s' % script.dirpath(),
+                               '--boxed',
+                               script)
+
+    result.stdout.fnmatch_lines([
+        '*- coverage: platform *, python * -*',
+        'test_dist_boxed * %s*' % SCRIPT_SIMPLE_RESULT,
+        '*1 passed*'
+        ])
+    assert result.ret == 0
+
+
+def test_not_started_plugin_does_not_fail(testdir):
+    plugin = pytest_cov.CovPlugin(None, None, start=False)
+    plugin.pytest_sessionfinish(None, None)
+    plugin.pytest_terminal_summary(None)

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to