diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-11-06 15:52:15 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-11-06 16:16:04 -0500 |
commit | 9c26c9580b95c782614397a218f8730169fffc12 (patch) | |
tree | f6a86e88541e008dcaf2b075b2e60e2617681966 | |
parent | 556344babd5210c093eba547d1b15489843f4359 (diff) | |
download | python-coveragepy-git-9c26c9580b95c782614397a218f8730169fffc12.tar.gz |
refactor: remove mention of Python 2 unicode
-rw-r--r-- | coverage/summary.py | 3 | ||||
-rw-r--r-- | tests/helpers.py | 4 | ||||
-rw-r--r-- | tests/test_plugins.py | 8 |
3 files changed, 3 insertions, 12 deletions
diff --git a/coverage/summary.py b/coverage/summary.py index 24aa30f2..464445ef 100644 --- a/coverage/summary.py +++ b/coverage/summary.py @@ -150,8 +150,7 @@ class SummaryReporter: def report(self, morfs, outfile=None): """Writes a report summarizing coverage statistics per module. - `outfile` is a file object to write the summary to. It must be opened - for native strings (bytes on Python 2, Unicode on Python 3). + `outfile` is a text-mode file object to write the summary to. """ self.outfile = outfile or sys.stdout diff --git a/tests/helpers.py b/tests/helpers.py index 446edce0..fbdf1397 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -62,8 +62,8 @@ def make_file(filename, text="", bytes=b"", newline=None): `filename` is the relative path to the file, including directories if desired, which will be created if need be. - `text` is the content to create in the file, a native string (bytes in - Python 2, unicode in Python 3), or `bytes` are the bytes to write. + `text` is the text content to create in the file, or `bytes` are the + bytes to write. If `newline` is provided, it is a string that will be used as the line endings in the created file, otherwise the line endings are as provided diff --git a/tests/test_plugins.py b/tests/test_plugins.py index b4239700..cd446441 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -343,9 +343,6 @@ class GoodFileTracerTest(FileTracerTest): # quux_5.html will be omitted from the results. assert render("quux_5.html", 3) == "[quux_5.html @ 3]" - - # 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 @@ -382,11 +379,6 @@ class GoodFileTracerTest(FileTracerTest): assert "quux_5.html" not in line_counts(cov.get_data()) - _, statements, missing, _ = cov.analysis("uni_3.html") - assert statements == [1, 2, 3] - assert missing == [1] - assert "uni_3.html" in line_counts(cov.get_data()) - def test_plugin2_with_branch(self): self.make_render_and_caller() |