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

Method test_runeval_step

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

Source from the content-addressed store, hash-verified

1031 tracer.run(compile(textwrap.dedent(code), '<string>', 'exec'))
1032
1033 def test_runeval_step(self):
1034 # Test bdb 'runeval'.
1035 code = """
1036 def main():
1037 lno = 3
1038 """
1039 modules = { TEST_MODULE: code }
1040 with create_modules(modules):
1041 self.expect_set = [
1042 ('line', 1, '<module>'), ('step', ),
1043 ('call', 2, 'main'), ('step', ),
1044 ('line', 3, 'main'), ('step', ),
1045 ('return', 3, 'main'), ('step', ),
1046 ('return', 1, '<module>'), ('quit', ),
1047 ]
1048 import test_module_for_bdb
1049 ns = {'test_module_for_bdb': test_module_for_bdb}
1050 with TracerRun(self) as tracer:
1051 tracer.runeval('test_module_for_bdb.main()', ns, ns)
1052
1053class IssuesTestCase(BaseTestCase):
1054 """Test fixed bdb issues."""

Callers

nothing calls this directly

Calls 3

TracerRunClass · 0.85
runevalMethod · 0.80
create_modulesFunction · 0.70

Tested by

no test coverage detected