Merge pull request #3452 from nicoddemus/fix-flaky-xdist-test

Attempt to fix flaky test on Python 2
This commit is contained in:
Ronny Pfannschmidt 2018-05-05 20:18:06 +02:00 committed by GitHub
commit 84b37e1b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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[:] = []