diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2023-10-26 06:17:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-26 06:17:28 (GMT) |
commit | 90a1b2859f99a4b07da6c46b99759444e3cefbfa (patch) | |
tree | e7ef4674c8e573906cfab0f3a3f096ac3fe4862d /Lib/test/test_subprocess.py | |
parent | 3f84a19e6291db682fc9a570e7612e80e2ffbbb5 (diff) | |
download | cpython-90a1b2859f99a4b07da6c46b99759444e3cefbfa.zip cpython-90a1b2859f99a4b07da6c46b99759444e3cefbfa.tar.gz cpython-90a1b2859f99a4b07da6c46b99759444e3cefbfa.tar.bz2 |
gh-67224: Show source lines in tracebacks when using the -c option when running Python (#111200)
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r-- | Lib/test/test_subprocess.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index a865df1..fe1a367 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -1769,9 +1769,9 @@ class RunFuncTestCase(BaseTestCase): cp = subprocess.run([sys.executable, "-Xwarn_default_encoding", "-c", code], capture_output=True) lines = cp.stderr.splitlines() - self.assertEqual(len(lines), 2, lines) + self.assertEqual(len(lines), 4, lines) self.assertTrue(lines[0].startswith(b"<string>:2: EncodingWarning: ")) - self.assertTrue(lines[1].startswith(b"<string>:3: EncodingWarning: ")) + self.assertTrue(lines[2].startswith(b"<string>:3: EncodingWarning: ")) def _get_test_grp_name(): |