diff --git a/test/conftest.py b/test/conftest.py index 0a5598e3a..7291600af 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -126,11 +126,12 @@ def __repr__(self): return "<%s: %s>" % (self.__class__.__name__, os.path.basename(self._path)) -@pytest.fixture() -def venv_path(tmpdir, environment): +@pytest.fixture(scope='session') +def venv_path(tmpdir_factory, environment): if environment.version_info.major < 3: pytest.skip("python -m venv does not exist in Python 2") + tmpdir = tmpdir_factory.mktemp('venv_path') dirname = os.path.join(tmpdir.dirname, 'venv') # We cannot use the Python from tox because tox creates virtualenvs and