aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_source_encoding.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_source_encoding.py')
-rw-r--r--Lib/test/test_source_encoding.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py
index 61b00778f83..1399f3fcd2d 100644
--- a/Lib/test/test_source_encoding.py
+++ b/Lib/test/test_source_encoding.py
@@ -145,8 +145,7 @@ class MiscSourceEncodingTest(unittest.TestCase):
compile(input, "<string>", "exec")
expected = "'ascii' codec can't decode byte 0xe2 in position 16: " \
"ordinal not in range(128)"
- self.assertTrue(c.exception.args[0].startswith(expected),
- msg=c.exception.args[0])
+ self.assertStartsWith(c.exception.args[0], expected)
def test_file_parse_error_multiline(self):
# gh96611: