diff options
author | Victor Stinner <vstinner@python.org> | 2019-12-08 07:38:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-08 07:38:16 (GMT) |
commit | 6cac1136665b70f72db291b95876d7affcf1d2db (patch) | |
tree | baf9af65677cacb92ec5d10d8567e90bf8246b17 /Lib/test/test_cmd_line_script.py | |
parent | 2b7de6696bf2f924cd2cd9ff0a539c8aa37c6244 (diff) | |
download | cpython-6cac1136665b70f72db291b95876d7affcf1d2db.zip cpython-6cac1136665b70f72db291b95876d7affcf1d2db.tar.gz cpython-6cac1136665b70f72db291b95876d7affcf1d2db.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_cmd_line_script.py')
-rw-r--r-- | Lib/test/test_cmd_line_script.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py index 6072307..2ac926d 100644 --- a/Lib/test/test_cmd_line_script.py +++ b/Lib/test/test_cmd_line_script.py @@ -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" |