Skip to content

Commit

Permalink
Strip output
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Mar 13, 2024
1 parent 6b7d01e commit 27e4bc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Lib/test/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -3390,7 +3390,7 @@ def __del__(self):
at_finalization = AtFinalization()
"""
_, out, err = assert_python_ok("-c", code)
self.assertEqual(out, b'OK\n')
self.assertEqual(out.strip(), b"OK")
self.assertIn(b"preexec_fn not supported at interpreter shutdown", err)

@unittest.skipIf(not sysconfig.get_config_var("HAVE_VFORK"),
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ def __del__(self):
at_finalization = AtFinalization()
"""
_, out, err = assert_python_ok("-c", code)
self.assertEqual(out, b'OK\n')
self.assertEqual(out.strip(), b"OK")
self.assertIn(b"can't create new thread at interpreter shutdown", err)

class ThreadJoinOnShutdown(BaseTestCase):
Expand Down Expand Up @@ -1361,7 +1361,7 @@ def thread1():
"""
rc, out, err = assert_python_ok('-c', script)
self.assertEqual(err, b"")
self.assertEqual(out, b"OK\n")
self.assertEqual(out.strip(), b"OK")
self.assertEqual(rc, 0)

@skip_unless_reliable_fork
Expand Down

0 comments on commit 27e4bc5

Please sign in to comment.