MCPcopy Index your code
hub / github.com/python/cpython / test_temporary_bp

Method test_temporary_bp

Lib/test/test_bdb.py:805–826  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

803 self.assertRaises(BdbError, tracer.runcall, tfunc_import)
804
805 def test_temporary_bp(self):
806 code = """
807 def func():
808 lno = 3
809
810 def main():
811 for i in range(2):
812 func()
813 """
814 modules = { TEST_MODULE: code }
815 with create_modules(modules):
816 self.expect_set = [
817 ('line', 2, 'tfunc_import'),
818 break_in_func('func', TEST_MODULE_FNAME, True),
819 ('None', 2, 'tfunc_import'),
820 break_in_func('func', TEST_MODULE_FNAME, True),
821 ('None', 2, 'tfunc_import'), ('continue', ),
822 ('line', 3, 'func', ({1:1}, [1])), ('continue', ),
823 ('line', 3, 'func', ({2:1}, [2])), ('quit', ),
824 ]
825 with TracerRun(self) as tracer:
826 tracer.runcall(tfunc_import)
827
828 def test_disabled_temporary_bp(self):
829 code = """

Callers

nothing calls this directly

Calls 4

break_in_funcFunction · 0.85
TracerRunClass · 0.85
create_modulesFunction · 0.70
runcallMethod · 0.45

Tested by

no test coverage detected