mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-91915: Fix test_netrc on non-UTF-8 locale (GH-91918)
This commit is contained in:
parent
5397b5afc1
commit
36306cf786
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ class NetrcTestCase(unittest.TestCase):
|
|||
mode = 'w'
|
||||
if sys.platform != 'cygwin':
|
||||
mode += 't'
|
||||
with open(temp_filename, mode) as fp:
|
||||
with open(temp_filename, mode, encoding="utf-8") as fp:
|
||||
fp.write(test_data)
|
||||
try:
|
||||
nrc = netrc.netrc(temp_filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue