diff options
-rw-r--r-- | tests/plugin1.py | 2 | ||||
-rw-r--r-- | tests/test_plugins.py | 14 |
2 files changed, 7 insertions, 9 deletions
diff --git a/tests/plugin1.py b/tests/plugin1.py index af4dfc52..63ebacf7 100644 --- a/tests/plugin1.py +++ b/tests/plugin1.py @@ -24,7 +24,7 @@ class FileTracer(coverage.FileTracer): """A FileTracer emulating a simple static plugin.""" def __init__(self, filename): - """Claim that xyz.py was actually sourced from ABC.zz""" + """Claim that */*xyz.py was actually sourced from /src/*ABC.zz""" self._filename = filename self._source_filename = os.path.join( "/src", diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 8ea0a8f5..0edfebe8 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -333,9 +333,8 @@ class GoodPluginTest(FileTracerTest): # quux_5.html will be omitted from the results. assert render("quux_5.html", 3) == "[quux_5.html @ 3]" - # In Python 2, either kind of string should be OK. - if sys.version_info[0] == 2: - assert render(u"uni_3.html", 2) == "[uni_3.html @ 2]" + # For Python 2, make sure unicode is working. + assert render(u"uni_3.html", 2) == "[uni_3.html @ 2]" """) # will try to read the actual source files, so make some @@ -372,11 +371,10 @@ class GoodPluginTest(FileTracerTest): self.assertNotIn("quux_5.html", cov.data.line_counts()) - if env.PY2: - _, 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()) + _, 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()) def test_plugin2_with_branch(self): self.make_render_and_caller() |