aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-xrun_project_tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index 2834254..0496d4a 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -46,9 +46,11 @@ class TestResult:
class AutoDeletedDir():
def __init__(self, d):
self.dir = d
+
def __enter__(self):
os.makedirs(self.dir, exist_ok=True)
return self.dir
+
def __exit__(self, _type, value, traceback):
# On Windows, shutil.rmtree fails sometimes, because 'the directory is not empty'.
# Retrying fixes this.