diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2013-10-20 07:58:57 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2013-10-20 07:58:57 -0400 |
commit | 6b6a4488adc12d390c5e0c8f13829dd9bf125309 (patch) | |
tree | 4eeeeb857c02023fd46d610612f600d533105afb /igor.py | |
parent | 2e5688eedd1576e9b100386c0a9ae30828123f73 (diff) | |
download | python-coveragepy-git-6b6a4488adc12d390c5e0c8f13829dd9bf125309.tar.gz |
with statements: no more finally close
--HG--
branch : 4.0
Diffstat (limited to 'igor.py')
-rw-r--r-- | igor.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -62,11 +62,8 @@ def run_tests_with_coverage(tracer, *nose_args): import nose pth_dir = os.path.dirname(os.path.dirname(nose.__file__)) pth_path = os.path.join(pth_dir, "covcov.pth") - pth_file = open(pth_path, "w") - try: + with open(pth_path, "w") as pth_file: pth_file.write("import coverage; coverage.process_startup()\n") - finally: - pth_file.close() version = "%s%s" % sys.version_info[:2] suffix = "%s_%s_%s" % (version, tracer, socket.gethostname()) |