mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
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>
This commit is contained in:
parent
f8775e4f72
commit
3caea9adda
6 changed files with 14 additions and 14 deletions
|
@ -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('#'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue