STINNER Victor added the comment:
It's not easy to test the patch because running test_pdb fails with the
following error (I also get the error if the patch is not applied):
$ ./python -m test test_pdb test_pdb
[1/2] test_pdb
[2/2] test_pdb
test test_pdb failed -- Traceback (most recent call last):
File "/home/haypo/prog/python/default/Lib/doctest.py", line 2189, in runTest
test, out=new.write, clear_globs=False)
AssertionError: Failed doctest test for
test.test_pdb.test_next_until_return_at_return_event
File "/home/haypo/prog/python/default/Lib/test/test_pdb.py", line 603, in
test_next_until_return_at_return_event
----------------------------------------------------------------------
File "/home/haypo/prog/python/default/Lib/test/test_pdb.py", line 617, in
test.test_pdb.test_next_until_return_at_return_event
Failed example:
with PdbTestInput(['break test_function_2',
'continue',
'return',
'next',
'continue',
'return',
'until',
'continue',
'return',
'return',
'continue']):
test_function()
Expected:
> <doctest
test.test_pdb.test_next_until_return_at_return_event[1]>(3)test_function()
-> test_function_2()
(Pdb) break test_function_2
Breakpoint 1 at <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>:1
(Pdb) continue
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(3)test_function_2()->None
-> x = 2
(Pdb) next
> <doctest
test.test_pdb.test_next_until_return_at_return_event[1]>(4)test_function()
-> test_function_2()
(Pdb) continue
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(3)test_function_2()->None
-> x = 2
(Pdb) until
> <doctest
test.test_pdb.test_next_until_return_at_return_event[1]>(5)test_function()
-> test_function_2()
(Pdb) continue
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(3)test_function_2()->None
-> x = 2
(Pdb) return
> <doctest
test.test_pdb.test_next_until_return_at_return_event[1]>(6)test_function()
-> end = 1
(Pdb) continue
Got:
> <doctest
test.test_pdb.test_next_until_return_at_return_event[1]>(3)test_function()
-> test_function_2()
(Pdb) break test_function_2
Breakpoint 7 at <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>:1
(Pdb) continue
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(3)test_function_2()->None
-> x = 2
(Pdb) next
> <doctest
test.test_pdb.test_next_until_return_at_return_event[1]>(4)test_function()
-> test_function_2()
(Pdb) continue
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(3)test_function_2()->None
-> x = 2
(Pdb) until
> <doctest
test.test_pdb.test_next_until_return_at_return_event[1]>(5)test_function()
-> test_function_2()
(Pdb) continue
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> <doctest
test.test_pdb.test_next_until_return_at_return_event[0]>(3)test_function_2()->None
-> x = 2
(Pdb) return
> <doctest
test.test_pdb.test_next_until_return_at_return_event[1]>(6)test_function()
-> end = 1
(Pdb) continue
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20766>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com