Hello community,

here is the log from the commit of package python-flaky for openSUSE:Factory 
checked in at 2019-09-23 12:09:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flaky (Old)
 and      /work/SRC/openSUSE:Factory/.python-flaky.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-flaky"

Mon Sep 23 12:09:10 2019 rev:5 rq:730399 version:3.6.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-flaky/python-flaky.changes        
2019-07-31 14:15:48.522739425 +0200
+++ /work/SRC/openSUSE:Factory/.python-flaky.new.7948/python-flaky.changes      
2019-09-23 12:09:11.877887660 +0200
@@ -1,0 +2,6 @@
+Thu Sep 12 12:33:03 UTC 2019 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 3.6.1:
+  * Reraise KeyboardInterrupt when running tests under pytest.
+
+-------------------------------------------------------------------

Old:
----
  flaky-3.6.0.tar.gz

New:
----
  flaky-3.6.1.tar.gz

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

Other differences:
------------------
++++++ python-flaky.spec ++++++
--- /var/tmp/diff_new_pack.xdO6fh/_old  2019-09-23 12:09:12.409887572 +0200
+++ /var/tmp/diff_new_pack.xdO6fh/_new  2019-09-23 12:09:12.413887571 +0200
@@ -26,13 +26,17 @@
 %bcond_with test
 %endif
 Name:           python-flaky
-Version:        3.6.0
+Version:        3.6.1
 Release:        0
 Summary:        Plugin for nose or py.test that automatically reruns flaky 
tests
 License:        Apache-2.0
 Group:          Development/Languages/Python
 URL:            https://github.com/box/flaky
 Source:         
https://files.pythonhosted.org/packages/source/f/flaky/flaky-%{version}.tar.gz
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
+BuildArch:      noarch
 %if %{with test}
 BuildRequires:  %{python_module flaky >= %{version}}
 BuildRequires:  %{python_module genty}
@@ -40,10 +44,6 @@
 BuildRequires:  %{python_module nose}
 BuildRequires:  %{python_module pytest}
 %endif
-BuildRequires:  %{python_module setuptools}
-BuildRequires:  fdupes
-BuildRequires:  python-rpm-macros
-BuildArch:      noarch
 %python_subpackages
 
 %description

++++++ flaky-3.6.0.tar.gz -> flaky-3.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flaky-3.6.0/PKG-INFO new/flaky-3.6.1/PKG-INFO
--- old/flaky-3.6.0/PKG-INFO    2019-06-25 18:47:28.000000000 +0200
+++ new/flaky-3.6.1/PKG-INFO    2019-08-06 20:41:21.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: flaky
-Version: 3.6.0
+Version: 3.6.1
 Summary: Plugin for nose or pytest that automatically reruns flaky tests.
 Home-page: https://github.com/box/flaky
 Author: Box
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flaky-3.6.0/flaky/flaky_pytest_plugin.py 
new/flaky-3.6.1/flaky/flaky_pytest_plugin.py
--- old/flaky-3.6.0/flaky/flaky_pytest_plugin.py        2019-01-10 
19:58:28.000000000 +0100
+++ new/flaky-3.6.1/flaky/flaky_pytest_plugin.py        2019-08-06 
20:25:51.000000000 +0200
@@ -2,7 +2,7 @@
 
 from __future__ import unicode_literals
 
-from _pytest.runner import CallInfo  # pylint:disable=import-error
+from _pytest.runner import call_runtest_hook  # pylint:disable=import-error
 
 from flaky._flaky_plugin import _FlakyPlugin
 from flaky.utils import ensure_unicode_string
@@ -126,7 +126,8 @@
         :type log:
             `bool`
         """
-        call = self.call_runtest_hook(item, when, **kwds)
+        call = call_runtest_hook(item, when, **kwds)
+        self._call_infos[item][when] = call
         hook = item.ihook
         report = hook.pytest_runtest_makereport(item=item, call=call)
         # Start flaky modifications
@@ -289,26 +290,6 @@
                 test_instance = item.parent.obj
         return test_instance
 
-    def call_runtest_hook(self, item, when, **kwds):
-        """
-        Monkey patched from the runner plugin. Responsible for running
-        the test. Had to be patched to pass additional info to the
-        CallInfo so the tests can be rerun if necessary.
-
-        :param item:
-            pytest wrapper for the test function to be run
-        :type item:
-            :class:`Function`
-        """
-        hookname = "pytest_runtest_" + when
-        ihook = getattr(item.ihook, hookname)
-        call_info = getattr(CallInfo, "from_call", CallInfo)(
-            lambda: ihook(item=item, **kwds),
-            when=when,
-        )
-        self._call_infos[item][when] = call_info
-        return call_info
-
     def add_success(self, item):
         """
         Called when a test succeeds.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flaky-3.6.0/flaky.egg-info/PKG-INFO 
new/flaky-3.6.1/flaky.egg-info/PKG-INFO
--- old/flaky-3.6.0/flaky.egg-info/PKG-INFO     2019-06-25 18:47:28.000000000 
+0200
+++ new/flaky-3.6.1/flaky.egg-info/PKG-INFO     2019-08-06 20:41:21.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: flaky
-Version: 3.6.0
+Version: 3.6.1
 Summary: Plugin for nose or pytest that automatically reruns flaky tests.
 Home-page: https://github.com/box/flaky
 Author: Box
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flaky-3.6.0/setup.py new/flaky-3.6.1/setup.py
--- old/flaky-3.6.0/setup.py    2019-06-24 19:11:57.000000000 +0200
+++ new/flaky-3.6.1/setup.py    2019-08-06 20:40:34.000000000 +0200
@@ -55,7 +55,7 @@
     base_dir = dirname(__file__)
     setup(
         name='flaky',
-        version='3.6.0',
+        version='3.6.1',
         description='Plugin for nose or pytest that automatically reruns flaky 
tests.',
         long_description=open(join(base_dir, 'README.rst')).read(),
         author='Box',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/flaky-3.6.0/test/test_pytest/test_flaky_pytest_plugin.py 
new/flaky-3.6.1/test/test_pytest/test_flaky_pytest_plugin.py
--- old/flaky-3.6.0/test/test_pytest/test_flaky_pytest_plugin.py        
2019-01-09 18:28:15.000000000 +0100
+++ new/flaky-3.6.1/test/test_pytest/test_flaky_pytest_plugin.py        
2019-08-06 20:25:51.000000000 +0200
@@ -5,11 +5,12 @@
 from mock import Mock, patch
 # pylint:disable=import-error
 import pytest
+from _pytest.runner import CallInfo
 # pylint:enable=import-error
 from flaky import flaky
 from flaky import _flaky_plugin
 from flaky.flaky_pytest_plugin import (
-    CallInfo,
+    call_runtest_hook,
     FlakyPlugin,
     FlakyXdist,
     PLUGIN,
@@ -54,7 +55,7 @@
 
 
 @pytest.fixture(params=['instance', 'module', 'parent'])
-def flaky_test(request):
+def flaky_test(request, mock_config):
     def test_function():
         pass
     test_owner = Mock()
@@ -63,6 +64,7 @@
     kwargs = {request.param: test_owner}
     test = MockTestItem(**kwargs)
     setattr(test, 'owner', test_owner)
+    setattr(test, 'config', mock_config)
     return test
 
 
@@ -103,6 +105,21 @@
         pass
 
 
+class MockConfig(object):
+    def getvalue(self, key):
+        # pylint:disable=unused-argument,no-self-use
+        return False
+
+    def getoption(self, key, default):
+        # pylint:disable=unused-argument,no-self-use
+        return default
+
+
+@pytest.fixture
+def mock_config():
+    return MockConfig()
+
+
 class MockFlakyCallInfo(CallInfo):
     def __init__(self, item, when):
         # pylint:disable=super-init-not-called
@@ -226,7 +243,7 @@
     flaky_test.ihook = Mock()
     flaky_test.ihook.pytest_runtest_setup = error_raising_setup_function
     flaky_plugin._call_infos[flaky_test] = {}  # 
pylint:disable=protected-access
-    call_info = flaky_plugin.call_runtest_hook(flaky_test, 'setup')
+    call_info = call_runtest_hook(flaky_test, 'setup')
     assert flaky_test.ran_setup
     assert string_io.getvalue() == mock_io.getvalue()
     assert call_info.excinfo.type is ZeroDivisionError


Reply via email to