diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-09-28 19:44:20 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-09-28 19:44:20 -0400 |
commit | ca8403a7bd70f42dc6f97826e0e58bd607799da7 (patch) | |
tree | 31be357db7bed769cb9fb9429f84647c443b9d0d /tests/test_farm.py | |
parent | f39a98df26fdff4cbb2238573bfcc53ce9660fb7 (diff) | |
download | python-coveragepy-ca8403a7bd70f42dc6f97826e0e58bd607799da7.tar.gz |
Pragmas for uncovered code
Diffstat (limited to 'tests/test_farm.py')
-rw-r--r-- | tests/test_farm.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_farm.py b/tests/test_farm.py index 47f9b7b..d0f0a72 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) |