summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_json
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2021-04-06 02:18:41 (GMT)
committerGitHub <noreply@github.com>2021-04-06 02:18:41 (GMT)
commitfb78692f2ad5ee4747f13a73943fbf134b637669 (patch)
treebeb9f1abe584a74f281955ead6541cdeeeaa17a8 /Lib/test/test_json
parentf84d5a113680c5a6aaaf9130aed7a34d611748ff (diff)
downloadcpython-fb78692f2ad5ee4747f13a73943fbf134b637669.zip
cpython-fb78692f2ad5ee4747f13a73943fbf134b637669.tar.gz
cpython-fb78692f2ad5ee4747f13a73943fbf134b637669.tar.bz2
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25189)
* Fix _sitebuiltins * Fix test_inspect * Fix test_interpreters * Fix test_io * Fix test_iter * Fix test_json * Fix test_linecache * Fix test_lltrace * Fix test_logging * Fix logging
Diffstat (limited to 'Lib/test/test_json')
-rw-r--r--Lib/test/test_json/test_tool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_json/test_tool.py b/Lib/test/test_json/test_tool.py
index 5411188..0386690 100644
--- a/Lib/test/test_json/test_tool.py
+++ b/Lib/test/test_json/test_tool.py
@@ -125,7 +125,7 @@ class TestTool(unittest.TestCase):
outfile = os_helper.TESTFN + '.out'
rc, out, err = assert_python_ok('-m', 'json.tool', infile, outfile)
self.addCleanup(os.remove, outfile)
- with open(outfile, "r") as fp:
+ with open(outfile, "r", encoding="utf-8") as fp:
self.assertEqual(fp.read(), self.expect)
self.assertEqual(rc, 0)
self.assertEqual(out, b'')