summaryrefslogtreecommitdiff
path: root/tests/test_farm.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_farm.py')
-rw-r--r--tests/test_farm.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_farm.py b/tests/test_farm.py
index 47f9b7b7..d0f0a72a 100644
--- a/tests/test_farm.py
+++ b/tests/test_farm.py
@@ -70,10 +70,9 @@ class FarmTestCase(object):
"""Execute the test from the run.py file.
"""
- if _TEST_NAME_FILE:
- f = open(_TEST_NAME_FILE, "w")
- f.write(self.description.replace("/", "_"))
- f.close()
+ if _TEST_NAME_FILE: # pragma: debugging
+ with open(_TEST_NAME_FILE, "w") as f:
+ f.write(self.description.replace("/", "_"))
cwd = self.cd(self.dir)