| OLD | NEW |
| 1 # Testing the line trace facility. | 1 # Testing the line trace facility. |
| 2 | 2 |
| 3 from test import test_support | 3 from test import test_support |
| 4 import unittest | 4 import unittest |
| 5 import sys | 5 import sys |
| 6 import difflib | 6 import difflib |
| 7 import gc | 7 import gc |
| 8 | 8 |
| 9 # A very basic example. If this fails, we're in deep trouble. | 9 # A very basic example. If this fails, we're in deep trouble. |
| 10 def basic(): | 10 def basic(): |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 onliners, | 344 onliners, |
| 345 [(0, 'call'), | 345 [(0, 'call'), |
| 346 (1, 'line'), | 346 (1, 'line'), |
| 347 (3, 'line'), | 347 (3, 'line'), |
| 348 (3, 'return')]) | 348 (3, 'return')]) |
| 349 | 349 |
| 350 def test_15_loops(self): | 350 def test_15_loops(self): |
| 351 # issue1750076: "while" expression is skipped by debugger | 351 # issue1750076: "while" expression is skipped by debugger |
| 352 def for_example(): | 352 def for_example(): |
| 353 for x in range(2): | 353 for x in range(2): |
| 354 pass | 354 y = x |
| 355 self.run_and_compare( | 355 self.run_and_compare( |
| 356 for_example, | 356 for_example, |
| 357 [(0, 'call'), | 357 [(0, 'call'), |
| 358 (1, 'line'), | 358 (1, 'line'), |
| 359 (2, 'line'), | 359 (2, 'line'), |
| 360 (1, 'line'), | 360 (1, 'line'), |
| 361 (2, 'line'), | 361 (2, 'line'), |
| 362 (1, 'line'), | 362 (1, 'line'), |
| 363 (1, 'return')]) | 363 (1, 'return')]) |
| 364 | 364 |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 | 742 |
| 743 def test_main(): | 743 def test_main(): |
| 744 test_support.run_unittest( | 744 test_support.run_unittest( |
| 745 TraceTestCase, | 745 TraceTestCase, |
| 746 RaisingTraceFuncTestCase, | 746 RaisingTraceFuncTestCase, |
| 747 JumpTestCase | 747 JumpTestCase |
| 748 ) | 748 ) |
| 749 | 749 |
| 750 if __name__ == "__main__": | 750 if __name__ == "__main__": |
| 751 test_main() | 751 test_main() |
| OLD | NEW |