From 3c1942fb35ac879ad10a868fe4ae78fef86924f0 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 16 Sep 2018 05:35:25 +0200 Subject: [PATCH] tests: venv_path: use session scope --- test/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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