Remove nwFuncTemp fixture

This commit is contained in:
Veronica K. B. Olsen
2020-12-05 21:08:42 +01:00
parent c353e9ffb1
commit d274c418d1
4 changed files with 45 additions and 59 deletions
-14
View File
@@ -198,17 +198,3 @@ def nwTempBuild(tmpDir):
if not os.path.isdir(buildDir):
os.mkdir(buildDir)
return buildDir
@pytest.fixture(scope="function")
def nwFuncTemp(tmpDir):
"""A temporary folder for a single test function.
"""
funcDir = os.path.join(tmpDir, "ftemp")
if os.path.isdir(funcDir):
shutil.rmtree(funcDir)
if not os.path.isdir(funcDir):
os.mkdir(funcDir)
yield funcDir
if os.path.isdir(funcDir):
shutil.rmtree(funcDir)
return