diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-04-04 08:01:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-04 08:01:10 (GMT) |
commit | 3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b (patch) | |
tree | 78737e7113e2b0a6fd07f20e7a7b751338293615 /Lib/test/test_float.py | |
parent | f8775e4f72240faba3947eea8efdd83ee56ae1fd (diff) | |
download | cpython-3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b.zip cpython-3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b.tar.gz cpython-3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b.tar.bz2 |
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25171)
* Fix test_float
* Fix _osx_support
* Fix test_fstring
* Fix test_gc
* Fix test_gzip
* Fix test_hashlib
* Fix unrelated whitespace issue
Co-authored-by: Ned Deily <nad@python.org>
Diffstat (limited to 'Lib/test/test_float.py')
-rw-r--r-- | Lib/test/test_float.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py index 99c81f0..ff4f387 100644 --- a/Lib/test/test_float.py +++ b/Lib/test/test_float.py @@ -729,7 +729,7 @@ class FormatTestCase(unittest.TestCase): @support.requires_IEEE_754 def test_format_testfile(self): - with open(format_testfile) as testfile: + with open(format_testfile, encoding="utf-8") as testfile: for line in testfile: if line.startswith('--'): continue @@ -769,7 +769,7 @@ class FormatTestCase(unittest.TestCase): class ReprTestCase(unittest.TestCase): def test_repr(self): with open(os.path.join(os.path.split(__file__)[0], - 'floating_points.txt')) as floats_file: + 'floating_points.txt'), encoding="utf-8") as floats_file: for line in floats_file: line = line.strip() if not line or line.startswith('#'): |