[Python-modules-commits] [python-flaky] 01/04: Import python-flaky_3.1.1.orig.tar.gz

Tristan Seligmann mithrandi at moszumanska.debian.org
Wed Apr 6 21:10:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

mithrandi pushed a commit to branch master
in repository python-flaky.

commit ba70790ffba1e79754e0453a87bb8ae3acef043e
Author: Tristan Seligmann <mithrandi at mithrandi.net>
Date:   Wed Apr 6 23:02:24 2016 +0200

    Import python-flaky_3.1.1.orig.tar.gz
---
 flaky/flaky_pytest_plugin.py            | 3 ++-
 setup.py                                | 2 +-
 test/test_pytest/test_pytest_example.py | 8 +++++++-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/flaky/flaky_pytest_plugin.py b/flaky/flaky_pytest_plugin.py
index 0117155..a9a1cdb 100644
--- a/flaky/flaky_pytest_plugin.py
+++ b/flaky/flaky_pytest_plugin.py
@@ -86,7 +86,8 @@ class FlakyPlugin(_FlakyPlugin):
                 if passed:
                     should_rerun = self.add_success(item)
                 else:
-                    should_rerun = self.add_failure(item, call_info.excinfo)
+                    skipped = call_info.excinfo.typename == 'Skipped'
+                    should_rerun = not skipped and self.add_failure(item, call_info.excinfo)
                     if not should_rerun:
                         item.excinfo = call_info.excinfo
         finally:
diff --git a/setup.py b/setup.py
index eb0d409..6bf7997 100644
--- a/setup.py
+++ b/setup.py
@@ -53,7 +53,7 @@ def main():
     base_dir = dirname(__file__)
     setup(
         name='flaky',
-        version='3.1.0',
+        version='3.1.1',
         description='Plugin for nose or py.test that automatically reruns flaky tests.',
         long_description=open(join(base_dir, 'README.rst')).read(),
         author='Box',
diff --git a/test/test_pytest/test_pytest_example.py b/test/test_pytest/test_pytest_example.py
index 2827d01..da3e9d2 100644
--- a/test/test_pytest/test_pytest_example.py
+++ b/test/test_pytest/test_pytest_example.py
@@ -2,11 +2,11 @@
 
 from __future__ import unicode_literals
 
-from unittest import TestCase
 # pylint:disable=import-error
 import pytest
 # pylint:enable=import-error
 from flaky import flaky
+from test.test_case_base import TestCase, skip
 
 
 # This is an end-to-end example of the flaky package in action. Consider it
@@ -133,3 +133,9 @@ class TestExampleRerunFilter(object):
         # pylint:disable=no-self-use
         TestExampleRerunFilter._threshold += 1
         assert TestExampleRerunFilter._threshold >= 1
+
+
+ at skip('This test always fails')
+ at flaky
+def test_something_that_always_fails_but_should_be_skipped():
+    assert 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-flaky.git



More information about the Python-modules-commits mailing list