Skip to content

Commit

Permalink
Use assertIn instead
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Aug 25, 2022
1 parent 3d60ff7 commit 5cc57ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/test/test_source_encoding.py
Original file line number Diff line number Diff line change
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 5cc57ad

Please sign in to comment.