mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-63161: Fix test_source_encoding when stderr is StringIO (GH-140361)
This commit is contained in:
parent
6493a6aaf3
commit
abb3b3142b
1 changed files with 1 additions and 1 deletions
|
|
@ -521,7 +521,7 @@ def check_script_error(self, src, expected, lineno=...):
|
|||
line = src.splitlines()[lineno-1].decode(errors='replace')
|
||||
if lineno == 1:
|
||||
line = line.removeprefix('\ufeff')
|
||||
line = line.encode(sys.stderr.encoding, sys.stderr.errors)
|
||||
line = line.encode(sys.__stderr__.encoding, sys.__stderr__.errors)
|
||||
self.assertIn(line, err)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue