diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-07-09 14:23:38 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-07-09 14:23:38 -0400 |
commit | fb2c6262c4964eba2d90a1ddd999fe5bc49827b4 (patch) | |
tree | 570cd77b933bcbb83d4fe20fd87ba660519d3bbe /tests/test_arcs.py | |
parent | e16eb5245857db6574a0c0fdcf76879708a316c4 (diff) | |
download | python-coveragepy-git-nedbat/close-data.tar.gz |
Make Analysis a context manager to properly close sqlite filesnedbat/close-data
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r-- | tests/test_arcs.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py index 638478ab..79a9b184 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -1315,7 +1315,8 @@ class MiscArcTest(CoverageTest): # ugh, unexposed methods?? filename = self.last_module_name + ".py" fr = cov._get_file_reporter(filename) - arcs_executed = cov._analyze(filename).arcs_executed() + with cov._analyze(filename) as analysis: + arcs_executed = analysis.arcs_executed() self.assertEqual( fr.missing_arc_description(3, -3, arcs_executed), "line 3 didn't finish the generator expression on line 3" |