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

Method test_clear_two_bp_on_same_line

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

Source from the content-addressed store, hash-verified

941 tracer.runcall(tfunc_import)
942
943 def test_clear_two_bp_on_same_line(self):
944 code = """
945 def func():
946 lno = 3
947 lno = 4
948
949 def main():
950 for i in range(3):
951 func()
952 """
953 modules = { TEST_MODULE: code }
954 with create_modules(modules):
955 self.expect_set = [
956 ('line', 2, 'tfunc_import'), ('break', (TEST_MODULE_FNAME, 3)),
957 ('None', 2, 'tfunc_import'), ('break', (TEST_MODULE_FNAME, 3)),
958 ('None', 2, 'tfunc_import'), ('break', (TEST_MODULE_FNAME, 4)),
959 ('None', 2, 'tfunc_import'), ('continue', ),
960 ('line', 3, 'func', ({1:1}, [])), ('continue', ),
961 ('line', 4, 'func', ({3:1}, [])), ('clear', (TEST_MODULE_FNAME, 3)),
962 ('None', 4, 'func'), ('continue', ),
963 ('line', 4, 'func', ({3:2}, [])), ('quit', ),
964 ]
965 with TracerRun(self) as tracer:
966 tracer.runcall(tfunc_import)
967
968 def test_clear_at_no_bp(self):
969 self.expect_set = [

Callers

nothing calls this directly

Calls 3

TracerRunClass · 0.85
create_modulesFunction · 0.70
runcallMethod · 0.45

Tested by

no test coverage detected