Merge pull request #3452 from nicoddemus/fix-flaky-xdist-test
Attempt to fix flaky test on Python 2
This commit is contained in:
commit
84b37e1b57
|
@ -523,6 +523,7 @@ class TestRequestBasic(object):
|
|||
testdir.makepyfile("""
|
||||
import sys
|
||||
import pytest
|
||||
from _pytest.compat import safe_str
|
||||
import gc
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
@ -539,7 +540,7 @@ class TestRequestBasic(object):
|
|||
|
||||
gc.collect()
|
||||
leaked_types = sum(1 for _ in gc.garbage
|
||||
if 'PseudoFixtureDef' in str(_))
|
||||
if 'PseudoFixtureDef' in safe_str(_))
|
||||
|
||||
gc.garbage[:] = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue