Skip to content

Commit 6d43cc4

Browse files
mdboomezio-melotti
andauthored
Apply suggestions from code review
Co-authored-by: Ezio Melotti <[email protected]>
1 parent 3d60ff7 commit 6d43cc4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_source_encoding.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class MiscSourceEncodingTest(unittest.TestCase):
1414

1515
def test_pep263(self):
1616
self.assertEqual(
17-
"ðÉÔÏÎ".encode("utf-8"),
17+
"ðÉÔÏÎ".encode("utf-8"),
1818
b'\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd'
1919
)
2020
self.assertEqual(
21-
"\ð".encode("utf-8"),
21+
"\ð".encode("utf-8"),
2222
b'\\\xd0\x9f'
2323
)
2424

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

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

0 commit comments

Comments
 (0)