summaryrefslogtreecommitdiff
path: root/tests/test_phystokens.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_phystokens.py')
-rw-r--r--tests/test_phystokens.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_phystokens.py b/tests/test_phystokens.py
index 9950e655..91a9d3d9 100644
--- a/tests/test_phystokens.py
+++ b/tests/test_phystokens.py
@@ -171,7 +171,7 @@ class SourceEncodingTest(CoverageTest):
def test_detect_source_encoding(self):
for _, source, expected in ENCODING_DECLARATION_SOURCES:
- assert source_encoding(source) == expected, "Wrong encoding in %r" % source
+ assert source_encoding(source) == expected, f"Wrong encoding in {source!r}"
# PyPy3 gets this case wrong. Not sure what I can do about it, so skip the test.
@pytest.mark.skipif(env.PYPY, reason="PyPy3 is wrong about non-comment encoding. Skip it.")
@@ -233,7 +233,7 @@ class NeuterEncodingDeclarationTest(CoverageTest):
# The neutered source will be detected as having no encoding
# declaration.
- assert source_encoding(neutered) == DEF_ENCODING, "Wrong encoding in %r" % neutered
+ assert source_encoding(neutered) == DEF_ENCODING, f"Wrong encoding in {neutered!r}"
def test_two_encoding_declarations(self):
input_src = textwrap.dedent("""\