diff --git a/ci_watson/plugin.py b/ci_watson/plugin.py index 2e7829a..286ecb4 100644 --- a/ci_watson/plugin.py +++ b/ci_watson/plugin.py @@ -67,12 +67,12 @@ def pytest_runtest_setup(item): @pytest.fixture(scope='function') -def _jail(tmpdir): +def _jail(tmp_path): """Perform test in a pristine temporary working directory.""" old_dir = os.getcwd() - os.chdir(tmpdir.strpath) + os.chdir(tmp_path) try: - yield tmpdir.strpath + yield str(tmp_path) finally: os.chdir(old_dir) diff --git a/setup.cfg b/setup.cfg index 25691c3..49c9736 100644 --- a/setup.cfg +++ b/setup.cfg @@ -59,3 +59,4 @@ junit_family = xunit2 filterwarnings = error ignore:numpy.ndarray size changed:RuntimeWarning +addopts = "-p no:legacypth"