mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25142)
* test__xxsubinterpreters * test_builtin * test_doctest * test_exceptions * test_opcodes * test_support * test_argparse * test_baseexception * test_bdb * test_bool * test_asdl_parser
This commit is contained in:
parent
bef7b26f72
commit
8bbfeb3330
11 changed files with 36 additions and 31 deletions
|
|
@ -24,7 +24,7 @@ class OpcodeTest(unittest.TestCase):
|
|||
def test_setup_annotations_line(self):
|
||||
# check that SETUP_ANNOTATIONS does not create spurious line numbers
|
||||
try:
|
||||
with open(ann_module.__file__) as f:
|
||||
with open(ann_module.__file__, encoding="utf-8") as f:
|
||||
txt = f.read()
|
||||
co = compile(txt, ann_module.__file__, 'exec')
|
||||
self.assertEqual(co.co_firstlineno, 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue