Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
  • Loading branch information
mdboom and ezio-melotti committed Aug 25, 2022
1 parent 3d60ff7 commit 6d43cc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/test/test_source_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class MiscSourceEncodingTest(unittest.TestCase):

def test_pep263(self):
self.assertEqual(
"ðÉÔÏÎ".encode("utf-8"),
"ðÉÔÏÎ".encode("utf-8"),
b'\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd'
)
self.assertEqual(
"\ð".encode("utf-8"),
"\ð".encode("utf-8"),
b'\\\xd0\x9f'
)

Expand Down Expand Up @@ -251,8 +251,8 @@ def check(content):
# We want to assert that the python subprocess failed gracefully,
# not via a signal.
self.assertGreaterEqual(rc, 1)
self.assertTrue(b"Non-UTF-8 code starting with" in stderr)
self.assertTrue(b"on line 5" in stderr)
self.assertIn(b"Non-UTF-8 code starting with", stderr)
self.assertIn(b"on line 5", stderr)

# continuation bytes in a sequence of 2, 3, or 4 bytes
continuation_bytes = [bytes([x]) for x in range(0x80, 0xC0)]
Expand Down

0 comments on commit 6d43cc4

Please sign in to comment.