diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-10 07:24:35 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-10 07:24:35 -0400 |
| commit | 267622b11b730ec69bf34202fc6258a2614394c5 (patch) | |
| tree | 2196c4a5b3d740efca14567de2d0fd33f33db44b /tests | |
| parent | 498b1484e466588a22cef520095f1fd0ed8b8ff8 (diff) | |
| download | python-coveragepy-git-267622b11b730ec69bf34202fc6258a2614394c5.tar.gz | |
style: use the official designation for utf-8
Yes, this is completely unimportant. Don't ask me why I bothered, I'm
not really sure.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/goldtest.py | 2 | ||||
| -rw-r--r-- | tests/helpers.py | 2 | ||||
| -rw-r--r-- | tests/test_process.py | 2 | ||||
| -rw-r--r-- | tests/test_python.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/goldtest.py b/tests/goldtest.py index cd946efb..f2b7fe19 100644 --- a/tests/goldtest.py +++ b/tests/goldtest.py @@ -122,7 +122,7 @@ def canonicalize_xml(xtext): for node in root.iter(): node.attrib = dict(sorted(node.items())) xtext = xml.etree.ElementTree.tostring(root) - return xtext.decode('utf8') + return xtext.decode("utf-8") def contains(filename, *strlist): diff --git a/tests/helpers.py b/tests/helpers.py index 28adf78c..c85a36cb 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -69,7 +69,7 @@ def make_file(filename, text="", bytes=b"", newline=None): text = textwrap.dedent(text) if newline: text = text.replace("\n", newline) - data = text.encode('utf8') + data = text.encode("utf-8") # Make sure the directories are available. dirs, _ = os.path.split(filename) diff --git a/tests/test_process.py b/tests/test_process.py index af2d3e78..c41c57b7 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -759,7 +759,7 @@ class ProcessTest(CoverageTest): # Pypy passes locally, but fails in CI? Perhaps the version of macOS is # significant? https://foss.heptapod.net/pypy/pypy/-/issues/3074 @pytest.mark.skipif(env.PYPY, reason="PyPy is unreliable with this test") - # Jython as of 2.7.1rc3 won't compile a filename that isn't utf8. + # Jython as of 2.7.1rc3 won't compile a filename that isn't utf-8. @pytest.mark.skipif(env.JYTHON, reason="Jython can't handle this test") def test_lang_c(self): # LANG=C forces getfilesystemencoding on Linux to 'ascii', which causes diff --git a/tests/test_python.py b/tests/test_python.py index dc9609c9..5965ca06 100644 --- a/tests/test_python.py +++ b/tests/test_python.py @@ -21,7 +21,7 @@ class GetZipBytesTest(CoverageTest): @pytest.mark.parametrize( "encoding", - ["utf8", "gb2312", "hebrew", "shift_jis", "cp1252"], + ["utf-8", "gb2312", "hebrew", "shift_jis", "cp1252"], ) def test_get_encoded_zip_files(self, encoding): # See igor.py, do_zipmods, for the text of these files. |
