Skip to content

Commit 5cc57ad

Browse files
committed
Use assertIn instead
1 parent 3d60ff7 commit 5cc57ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_source_encoding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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)