diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-04-05 13:11:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-05 13:11:23 +0900 |
commit | c8e5eb904e12010d2302364e1037c24a30f5e241 (patch) | |
tree | ea1ad39012846500bbb9560262c7f9cd464b62f8 /Lib/test/test_importlib/test_api.py | |
parent | ee952b5c7355cb64179ca9bb77b13e7738132d3d (diff) | |
download | cpython-git-c8e5eb904e12010d2302364e1037c24a30f5e241.tar.gz |
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25181)
* Fix test_shutil
* Fix test_imp
* Fix test_import
* Fix test_importlib
Diffstat (limited to 'Lib/test/test_importlib/test_api.py')
-rw-r--r-- | Lib/test/test_importlib/test_api.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/test_api.py b/Lib/test/test_importlib/test_api.py index 384ae9ca7a..8344fb0e66 100644 --- a/Lib/test/test_importlib/test_api.py +++ b/Lib/test/test_importlib/test_api.py @@ -312,7 +312,7 @@ class ReloadTests: '__file__': None, } os.mkdir(name) - with open(bad_path, 'w') as init_file: + with open(bad_path, 'w', encoding='utf-8') as init_file: init_file.write('eggs = None') module = self.init.import_module(name) ns = vars(module).copy() |