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

Method test_bp_condition

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

Source from the content-addressed store, hash-verified

854 tracer.runcall(tfunc_import)
855
856 def test_bp_condition(self):
857 code = """
858 def func(a):
859 lno = 3
860
861 def main():
862 for i in range(3):
863 func(i)
864 """
865 modules = { TEST_MODULE: code }
866 with create_modules(modules):
867 self.expect_set = [
868 ('line', 2, 'tfunc_import'),
869 break_in_func('func', TEST_MODULE_FNAME, False, 'a == 2'),
870 ('None', 2, 'tfunc_import'), ('continue', ),
871 ('line', 3, 'func', ({1:3}, [])), ('quit', ),
872 ]
873 with TracerRun(self) as tracer:
874 tracer.runcall(tfunc_import)
875
876 def test_bp_exception_on_condition_evaluation(self):
877 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