From bf46c0b86572b1ad1d3e0b55dd75f8ed238ec91a Mon Sep 17 00:00:00 2001 From: Anatoly Bubenkov Date: Wed, 13 Jul 2016 17:56:03 +0200 Subject: [PATCH] use tmpdir_factory to get session scoped tmpdir --- CHANGES.rst | 6 ++++++ pytest_splinter/__init__.py | 2 +- pytest_splinter/plugin.py | 7 +++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index ac11a7c..46adb7b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,12 @@ Changelog ========= +1.7.4 +----- + +- use tmpdir_factory to get session scoped tmpdir (RonnyPfannschmidt, bubenkoff) + + 1.7.3 ----- diff --git a/pytest_splinter/__init__.py b/pytest_splinter/__init__.py index b653e67..0c927f6 100644 --- a/pytest_splinter/__init__.py +++ b/pytest_splinter/__init__.py @@ -1,2 +1,2 @@ """pytest-splinter package.""" -__version__ = '1.7.3' +__version__ = '1.7.4' diff --git a/pytest_splinter/plugin.py b/pytest_splinter/plugin.py index a93409f..e62d7f5 100644 --- a/pytest_splinter/plugin.py +++ b/pytest_splinter/plugin.py @@ -17,7 +17,6 @@ import pytest # pragma: no cover import splinter # pragma: no cover from _pytest import junitxml -from _pytest.tmpdir import tmpdir from selenium.webdriver.support import wait from selenium.webdriver.firefox.firefox_profile import FirefoxProfile @@ -25,7 +24,6 @@ from .webdriver_patches import patch_webdriver # pragma: no cover from .splinter_patches import patch_webdriverelement # pragma: no cover -from .decorators import with_fixtures LOGGER = logging.getLogger(__name__) @@ -264,9 +262,10 @@ def browser_patches(): @pytest.fixture(scope='session') -def session_tmpdir(request): +def session_tmpdir(request, tmpdir_factory): """pytest tmpdir which is session-scoped.""" - return with_fixtures(tmpdir)(request) + from _pytest.tmpdir import tmpdir + return tmpdir(request, tmpdir_factory) @pytest.fixture(scope='session')