diff options
-rw-r--r-- | tests/conftest.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 81c13dd7..75adf3f2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,7 +7,6 @@ Pytest auto configuration. This module is run automatically by pytest, to define and enable fixtures. """ -import os import sys import warnings @@ -66,31 +65,6 @@ def reset_sys_path(): sys.path[:] = sys_path -@pytest.fixture(autouse=True) -def fix_xdist_sys_path(): - """Prevent xdist from polluting the Python path. - - We run tests that care a lot about the contents of sys.path. Pytest-xdist - changes sys.path, so running with xdist, vs without xdist, sets sys.path - differently. With xdist, sys.path[1] is an empty string, without xdist, - it's the virtualenv bin directory. We don't want the empty string, so - clobber that entry. - - See: https://github.com/pytest-dev/pytest-xdist/issues/376 - - """ - if os.environ.get('PYTEST_XDIST_WORKER', ''): # pragma: part covered - # We are running in an xdist worker. - if sys.path[1] == '': - # xdist has set sys.path[1] to ''. Clobber it. - del sys.path[1] - # Also, don't let it sneak stuff in via PYTHONPATH. - try: - del os.environ['PYTHONPATH'] - except KeyError: - pass - - @pytest.hookimpl(hookwrapper=True) def pytest_runtest_call(item): """Convert StopEverything into skipped tests.""" |