PATH:
opt
/
bitninja-python-dojo
/
embedded
/
lib
/
python3.9
/
test
/
test_tools
"""Tests for the gprof2html script in the Tools directory.""" import os import sys import unittest from unittest import mock import tempfile from test.test_tools import skip_if_missing, import_tool skip_if_missing() class Gprof2htmlTests(unittest.TestCase): def setUp(self): self.gprof = import_tool('gprof2html') oldargv = sys.argv def fixup(): sys.argv = oldargv self.addCleanup(fixup) sys.argv = [] def test_gprof(self): # Issue #14508: this used to fail with a NameError. with mock.patch.object(self.gprof, 'webbrowser') as wmock, \ tempfile.TemporaryDirectory() as tmpdir: fn = os.path.join(tmpdir, 'abc') open(fn, 'w').close() sys.argv = ['gprof2html', fn] self.gprof.main() self.assertTrue(wmock.open.called) if __name__ == '__main__': unittest.main()
[-] test_pdeps.py
[edit]
[-] test_sundry.py
[edit]
[-] test_gprof2html.py
[edit]
[+]
..
[-] test_reindent.py
[edit]
[-] test_lll.py
[edit]
[-] __main__.py
[edit]
[-] test_md5sum.py
[edit]
[+]
__pycache__
[-] test_i18n.py
[edit]
[-] __init__.py
[edit]
[-] test_pindent.py
[edit]
[-] test_pathfix.py
[edit]
[-] test_fixcid.py
[edit]