diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-04-04 00:01:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-04 00:01:23 (GMT) |
commit | 35715d1e72b7e15e337087863c75af447199e0fb (patch) | |
tree | 2af3473ba410ffc4b83d74df4d0776814095f25d /Lib/ctypes | |
parent | dc6d3e1e4c0c1e4b2210edab8fb4762569dc2936 (diff) | |
download | cpython-35715d1e72b7e15e337087863c75af447199e0fb.zip cpython-35715d1e72b7e15e337087863c75af447199e0fb.tar.gz cpython-35715d1e72b7e15e337087863c75af447199e0fb.tar.bz2 |
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25145)
* test_asyncio
* test_bz2
* test_math
* test_cmath
* test_cmd_line
* test_cmd_line_script
* test_compile
* test_contextlib
* test_profile
* ctypes/test/test_find
* test_multiprocessing
* test_configparser
* test_csv
* test_dbm_dumb
* test_decimal
* test_difflib
* os.fdopen() calls io.text_encoding() to emit EncodingWarning for right place.
Diffstat (limited to 'Lib/ctypes')
-rw-r--r-- | Lib/ctypes/test/test_find.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py index 4a8a382..1ff9d01 100644 --- a/Lib/ctypes/test/test_find.py +++ b/Lib/ctypes/test/test_find.py @@ -90,7 +90,7 @@ class FindLibraryLinux(unittest.TestCase): srcname = os.path.join(d, 'dummy.c') libname = 'py_ctypes_test_dummy' dstname = os.path.join(d, 'lib%s.so' % libname) - with open(srcname, 'w') as f: + with open(srcname, 'wb') as f: pass self.assertTrue(os.path.exists(srcname)) # compile the file to a shared library |