Skip to content

Commit 49defa2

Browse files
authored
Merge pull request #4144 from nicoddemus/fix-flaky-durations-test
Fix flaky durations test
2 parents fe2dae4 + 4808145 commit 49defa2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

testing/acceptance_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,6 @@ def test_calls(self, testdir):
808808
result.stdout.fnmatch_lines_random(
809809
["*durations*", "*call*test_3*", "*call*test_2*"]
810810
)
811-
assert "test_something" not in result.stdout.str()
812811
result.stdout.fnmatch_lines(
813812
["(0.00 durations hidden. Use -vv to show these durations.)"]
814813
)

testing/python/fixture.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,12 @@ def test_method(self, something):
494494
reason="this method of test doesn't work on pypy",
495495
)
496496
def test_request_garbage(self, testdir):
497+
try:
498+
import xdist # noqa
499+
except ImportError:
500+
pass
501+
else:
502+
pytest.xfail("this test is flaky when executed with xdist")
497503
testdir.makepyfile(
498504
"""
499505
import sys

0 commit comments

Comments
 (0)