diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2018-07-08 16:34:48 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2018-07-08 16:34:48 -0400 |
commit | b7ca9039c68fefff93f8c787f0c1589e097c8e4f (patch) | |
tree | 354662b80c20ee4dda79fcd480d0db3da2d3234e /tests | |
parent | b6242f45e29d63b62989a48d1097e1c30bf22eaf (diff) | |
download | python-coveragepy-git-b7ca9039c68fefff93f8c787f0c1589e097c8e4f.tar.gz |
Be stricter about self._data
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_plugins.py | 8 | ||||
-rw-r--r-- | tests/test_summary.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py index c9a8feae..0987e41a 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -369,19 +369,19 @@ class GoodFileTracerTest(FileTracerTest): _, statements, missing, _ = cov.analysis("foo_7.html") self.assertEqual(statements, [1, 2, 3, 4, 5, 6, 7]) self.assertEqual(missing, [1, 2, 3, 6, 7]) - self.assertIn("foo_7.html", cov.data.line_counts()) + self.assertIn("foo_7.html", cov.get_data().line_counts()) _, statements, missing, _ = cov.analysis("bar_4.html") self.assertEqual(statements, [1, 2, 3, 4]) self.assertEqual(missing, [1, 4]) - self.assertIn("bar_4.html", cov.data.line_counts()) + self.assertIn("bar_4.html", cov.get_data().line_counts()) - self.assertNotIn("quux_5.html", cov.data.line_counts()) + self.assertNotIn("quux_5.html", cov.get_data().line_counts()) _, statements, missing, _ = cov.analysis("uni_3.html") self.assertEqual(statements, [1, 2, 3]) self.assertEqual(missing, [1]) - self.assertIn("uni_3.html", cov.data.line_counts()) + self.assertIn("uni_3.html", cov.get_data().line_counts()) def test_plugin2_with_branch(self): self.make_render_and_caller() diff --git a/tests/test_summary.py b/tests/test_summary.py index adc1fcfa..b2895370 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -771,7 +771,7 @@ class TestSummaryReporterConfiguration(CoverageTest): cov = Coverage() cov.start() cov.stop() # pragma: nested - cov.data = coverage_data + cov._data = coverage_data printer = SummaryReporter(cov, options) destination = StringIO() printer.report([], destination) |