summaryrefslogtreecommitdiff
path: root/tests/test_plugins.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-08-10 16:39:22 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-08-10 16:39:22 -0400
commit8562aeb29eddf3349f5c363c1842f9822b18a450 (patch)
tree7f4c0f16843c4f9b78cc49c4f6d0354a0d8a0f91 /tests/test_plugins.py
parent90bb6a77e02cbac6a23723b5907d5f59d1db1b82 (diff)
downloadpython-coveragepy-git-8562aeb29eddf3349f5c363c1842f9822b18a450.tar.gz
Move line_counts out of the data classes
Diffstat (limited to 'tests/test_plugins.py')
-rw-r--r--tests/test_plugins.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index 0987e41a..2d0f8426 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -8,6 +8,7 @@ import os.path
import coverage
from coverage import env
from coverage.backward import StringIO
+from coverage.data import line_counts
from coverage.control import Plugins
from coverage.misc import CoverageException
@@ -369,19 +370,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.get_data().line_counts())
+ self.assertIn("foo_7.html", line_counts(cov.get_data()))
_, 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.get_data().line_counts())
+ self.assertIn("bar_4.html", line_counts(cov.get_data()))
- self.assertNotIn("quux_5.html", cov.get_data().line_counts())
+ self.assertNotIn("quux_5.html", line_counts(cov.get_data()))
_, statements, missing, _ = cov.analysis("uni_3.html")
self.assertEqual(statements, [1, 2, 3])
self.assertEqual(missing, [1])
- self.assertIn("uni_3.html", cov.get_data().line_counts())
+ self.assertIn("uni_3.html", line_counts(cov.get_data()))
def test_plugin2_with_branch(self):
self.make_render_and_caller()