mirror of
https://github.com/python/cpython.git
synced 2025-10-28 12:15:13 +00:00
GH-128520: pathlib ABCs tests: use explicit text encoding (#133105)
Follow-up to fbffd70. Set `encoding='utf-8'` when reading and writing text
in the tests for the private pathlib ABCs, which allows the tests to run
with `-W error -X warn_default_encoding`
This commit is contained in:
parent
606003ffa9
commit
336322b341
4 changed files with 13 additions and 13 deletions
|
|
@ -82,7 +82,7 @@ def create_hierarchy(self, p):
|
|||
readlink = staticmethod(os.readlink)
|
||||
|
||||
def readtext(self, p):
|
||||
with open(p, 'r') as f:
|
||||
with open(p, 'r', encoding='utf-8') as f:
|
||||
return f.read()
|
||||
|
||||
def readbytes(self, p):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue