mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Fix EncodingWarning in test_tools. (GH-28846)
This commit is contained in:
parent
3d1ca867ed
commit
a1c3c9e824
7 changed files with 29 additions and 25 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue