forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythonGH-111744: Make breakpoint() enter the debugger immediately (py…
- Loading branch information
1 parent
1511bc9
commit 5a0022a
Showing
8 changed files
with
162 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2056,8 +2056,7 @@ def test_pdb_set_trace(): | |
>>> try: runner.run(test) | ||
... finally: sys.stdin = real_stdin | ||
--Return-- | ||
> <doctest foo-bar@baz[2]>(1)<module>()->None | ||
> <doctest foo-bar@baz[2]>(1)<module>() | ||
-> import pdb; pdb.set_trace() | ||
(Pdb) print(x) | ||
42 | ||
|
@@ -2087,8 +2086,7 @@ def test_pdb_set_trace(): | |
... runner.run(test) | ||
... finally: | ||
... sys.stdin = real_stdin | ||
--Return-- | ||
> <doctest test.test_doctest.test_doctest.test_pdb_set_trace[9]>(3)calls_set_trace()->None | ||
> <doctest test.test_doctest.test_doctest.test_pdb_set_trace[9]>(3)calls_set_trace() | ||
-> import pdb; pdb.set_trace() | ||
(Pdb) print(y) | ||
2 | ||
|
@@ -2114,6 +2112,7 @@ def test_pdb_set_trace(): | |
>>> test = parser.get_doctest(doc, globals(), "foo-bar@baz", "[email protected]", 0) | ||
>>> real_stdin = sys.stdin | ||
>>> sys.stdin = FakeInput([ | ||
... 'step', # return event of g | ||
... 'list', # list source from example 2 | ||
... 'next', # return from g() | ||
... 'list', # list source from example 1 | ||
|
@@ -2124,6 +2123,9 @@ def test_pdb_set_trace(): | |
>>> try: runner.run(test) | ||
... finally: sys.stdin = real_stdin | ||
... # doctest: +NORMALIZE_WHITESPACE | ||
> <doctest foo-bar@baz[1]>(3)g() | ||
-> import pdb; pdb.set_trace() | ||
(Pdb) step | ||
--Return-- | ||
> <doctest foo-bar@baz[1]>(3)g()->None | ||
-> import pdb; pdb.set_trace() | ||
|
@@ -2188,6 +2190,7 @@ def test_pdb_set_trace_nested(): | |
>>> test = parser.get_doctest(doc, globals(), "foo-bar@baz", "[email protected]", 0) | ||
>>> real_stdin = sys.stdin | ||
>>> sys.stdin = FakeInput([ | ||
... 'step', | ||
... 'print(y)', # print data defined in the function | ||
... 'step', 'step', 'step', 'step', 'step', 'step', 'print(z)', | ||
... 'up', 'print(x)', | ||
|
@@ -2201,6 +2204,9 @@ def test_pdb_set_trace_nested(): | |
... finally: | ||
... sys.stdin = real_stdin | ||
... # doctest: +REPORT_NDIFF | ||
> <doctest test.test_doctest.test_doctest.test_pdb_set_trace_nested[0]>(4)calls_set_trace() | ||
-> import pdb; pdb.set_trace() | ||
(Pdb) step | ||
> <doctest test.test_doctest.test_doctest.test_pdb_set_trace_nested[0]>(5)calls_set_trace() | ||
-> self.f1() | ||
(Pdb) print(y) | ||
|
Oops, something went wrong.