bpo-38991: Remove test.support.strip_python_stderr() (GH-17490)

test.support: run_python_until_end(), assert_python_ok() and
assert_python_failure() functions no longer strip whitespaces from
stderr.
This commit is contained in:
Victor Stinner 2019-12-08 08:38:16 +01:00 committed by GitHub
parent 2b7de6696b
commit 6cac113666
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 46 additions and 61 deletions

View file

@ -535,7 +535,7 @@ class CmdLineTest(unittest.TestCase):
script_name = _make_test_script(script_dir, 'script', script)
exitcode, stdout, stderr = assert_python_failure(script_name)
text = stderr.decode('ascii').split('\n')
self.assertEqual(len(text), 4)
self.assertEqual(len(text), 5)
self.assertTrue(text[0].startswith('Traceback'))
self.assertTrue(text[1].startswith(' File '))
self.assertTrue(text[3].startswith('NameError'))
@ -579,7 +579,7 @@ class CmdLineTest(unittest.TestCase):
script_name = _make_test_script(script_dir, 'script', script)
exitcode, stdout, stderr = assert_python_failure(script_name)
text = stderr.decode('ascii')
self.assertEqual(text, "some text")
self.assertEqual(text.rstrip(), "some text")
def test_syntaxerror_unindented_caret_position(self):
script = "1 + 1 = 2\n"