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:
Inada Naoki 2021-04-02 12:53:46 +09:00 committed by GitHub
parent bef7b26f72
commit 8bbfeb3330
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 36 additions and 31 deletions

View file

@ -54,9 +54,9 @@ class ExceptionTests(unittest.TestCase):
self.assertRaises(AttributeError, getattr, sys, "undefined_attribute")
self.raise_catch(EOFError, "EOFError")
fp = open(TESTFN, 'w')
fp = open(TESTFN, 'w', encoding="utf-8")
fp.close()
fp = open(TESTFN, 'r')
fp = open(TESTFN, 'r', encoding="utf-8")
savestdin = sys.stdin
try:
try: