mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.13] gh-117174: Add a new route in linecache to fetch interactive source code (GH-117500) (#131060)
gh-117174: Add a new route in linecache to fetch interactive source code (GH-117500)
(cherry picked from commit a931a8b324
)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
parent
ebd2ed7ad8
commit
c7022230d2
16 changed files with 142 additions and 93 deletions
|
@ -4546,11 +4546,11 @@ class MiscIOTest(unittest.TestCase):
|
|||
''')
|
||||
proc = assert_python_ok('-X', 'warn_default_encoding', '-c', code)
|
||||
warnings = proc.err.splitlines()
|
||||
self.assertEqual(len(warnings), 4)
|
||||
self.assertEqual(len(warnings), 2)
|
||||
self.assertTrue(
|
||||
warnings[0].startswith(b"<string>:5: EncodingWarning: "))
|
||||
self.assertTrue(
|
||||
warnings[2].startswith(b"<string>:8: EncodingWarning: "))
|
||||
warnings[1].startswith(b"<string>:8: EncodingWarning: "))
|
||||
|
||||
def test_text_encoding(self):
|
||||
# PEP 597, bpo-47000. io.text_encoding() returns "locale" or "utf-8"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue