diff options
| author | Inada Naoki <songofacandy@gmail.com> | 2021-10-10 07:14:40 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-10 07:14:40 (GMT) |
| commit | a1c3c9e8245a88cf37b084869b3559638116daf7 (patch) | |
| tree | 506e40dc912bcfc8113230cad6b064c0fd1b3520 /Lib/test/test_tools/test_gprof2html.py | |
| parent | 3d1ca867ed0e3ae343166806f8ddd9739e568ab4 (diff) | |
| download | cpython-a1c3c9e8245a88cf37b084869b3559638116daf7.zip cpython-a1c3c9e8245a88cf37b084869b3559638116daf7.tar.gz cpython-a1c3c9e8245a88cf37b084869b3559638116daf7.tar.bz2 | |
Fix EncodingWarning in test_tools. (GH-28846)
Diffstat (limited to 'Lib/test/test_tools/test_gprof2html.py')
| -rw-r--r-- | Lib/test/test_tools/test_gprof2html.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_tools/test_gprof2html.py b/Lib/test/test_tools/test_gprof2html.py index 9489ed9..7cceb8f 100644 --- a/Lib/test/test_tools/test_gprof2html.py +++ b/Lib/test/test_tools/test_gprof2html.py @@ -25,7 +25,7 @@ class Gprof2htmlTests(unittest.TestCase): with mock.patch.object(self.gprof, 'webbrowser') as wmock, \ tempfile.TemporaryDirectory() as tmpdir: fn = os.path.join(tmpdir, 'abc') - open(fn, 'w').close() + open(fn, 'wb').close() sys.argv = ['gprof2html', fn] self.gprof.main() self.assertTrue(wmock.open.called) |
