diff options
| author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-02-04 23:51:55 (GMT) |
|---|---|---|
| committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-02-04 23:51:55 (GMT) |
| commit | bc212104e48eaaf2038c0a3f9dc2e1304a039a8b (patch) | |
| tree | 20e3fdcc6af9daaf53d3169fdb0bad22612f9a66 /Lib/test | |
| parent | dcf84003c18ccd6e7ccf176dab069b1900bb651c (diff) | |
| download | cpython-bc212104e48eaaf2038c0a3f9dc2e1304a039a8b.zip cpython-bc212104e48eaaf2038c0a3f9dc2e1304a039a8b.tar.gz cpython-bc212104e48eaaf2038c0a3f9dc2e1304a039a8b.tar.bz2 | |
No need to emit co_lnotab item when both offsets are zeros.
r60579 broke a test test_compile, which seems to test an "implementation detail" IMO.
Also test that this correction does not impact the debugger.
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_trace.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py index 64dca9f..ab47431 100644 --- a/Lib/test/test_trace.py +++ b/Lib/test/test_trace.py @@ -352,6 +352,15 @@ class TraceTestCase(unittest.TestCase): (3, 'line'), (3, 'return')]) + def test_16_blank_lines(self): + exec("def f():\n" + "\n" * 256 + " pass") + self.run_and_compare( + f, + [(0, 'call'), + (257, 'line'), + (257, 'return')]) + + class RaisingTraceFuncTestCase(unittest.TestCase): def trace(self, frame, event, arg): """A trace function that raises an exception in response to a |
