diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2023-10-26 15:17:28 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-26 15:17:28 +0900 |
commit | 90a1b2859f99a4b07da6c46b99759444e3cefbfa (patch) | |
tree | e7ef4674c8e573906cfab0f3a3f096ac3fe4862d /Lib/test/test_io.py | |
parent | 3f84a19e6291db682fc9a570e7612e80e2ffbbb5 (diff) | |
download | cpython-90a1b2859f99a4b07da6c46b99759444e3cefbfa.tar.gz cpython-90a1b2859f99a4b07da6c46b99759444e3cefbfa.zip |
gh-67224: Show source lines in tracebacks when using the -c option when running Python (#111200)
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r-- | Lib/test/test_io.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 022cf21a470..4c80429684e 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -4396,11 +4396,11 @@ class MiscIOTest(unittest.TestCase): ''') proc = assert_python_ok('-X', 'warn_default_encoding', '-c', code) warnings = proc.err.splitlines() - self.assertEqual(len(warnings), 2) + self.assertEqual(len(warnings), 4) self.assertTrue( warnings[0].startswith(b"<string>:5: EncodingWarning: ")) self.assertTrue( - warnings[1].startswith(b"<string>:8: EncodingWarning: ")) + warnings[2].startswith(b"<string>:8: EncodingWarning: ")) def test_text_encoding(self): # PEP 597, bpo-47000. io.text_encoding() returns "locale" or "utf-8" |