(self)
| 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 = """ |
nothing calls this directly
no test coverage detected