diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2018-10-14 18:40:14 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-14 18:40:14 -0300 |
commit | 49defa28901fb951c47dafc15b8004b18d089c5e (patch) | |
tree | d7c1bbb8d05a588cf7297d69bb2bcd8175829a75 | |
parent | fe2dae488576c32fbd91321bdac50f5d209d9eb9 (diff) | |
parent | 48081458466f1ae62766be7593cc9b9e682ddbef (diff) | |
download | pytest-49defa28901fb951c47dafc15b8004b18d089c5e.tar.gz |
Merge pull request #4144 from nicoddemus/fix-flaky-durations-test
Fix flaky durations test
-rw-r--r-- | testing/acceptance_test.py | 1 | ||||
-rw-r--r-- | testing/python/fixture.py | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 6f791dc84..41cdba067 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -808,7 +808,6 @@ class TestDurations(object): result.stdout.fnmatch_lines_random( ["*durations*", "*call*test_3*", "*call*test_2*"] ) - assert "test_something" not in result.stdout.str() result.stdout.fnmatch_lines( ["(0.00 durations hidden. Use -vv to show these durations.)"] ) diff --git a/testing/python/fixture.py b/testing/python/fixture.py index 7e125e0b7..7ec7e9c1c 100644 --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -494,6 +494,12 @@ class TestRequestBasic(object): reason="this method of test doesn't work on pypy", ) def test_request_garbage(self, testdir): + try: + import xdist # noqa + except ImportError: + pass + else: + pytest.xfail("this test is flaky when executed with xdist") testdir.makepyfile( """ import sys |