mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
Factor out stripping of interpreter debug output in test.support.strip_python_stderr()
This commit is contained in:
parent
f96482e91a
commit
62f68ed31f
3 changed files with 13 additions and 3 deletions
|
@ -53,7 +53,7 @@ class BaseTestCase(unittest.TestCase):
|
|||
# In a debug build, stuff like "[6580 refs]" is printed to stderr at
|
||||
# shutdown time. That frustrates tests trying to check stderr produced
|
||||
# from a spawned Python process.
|
||||
actual = re.sub("\[\d+ refs\]\r?\n?$", "", stderr.decode()).encode()
|
||||
actual = support.strip_python_stderr(stderr)
|
||||
self.assertEqual(actual, expected, msg)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue