Skip to content

Commit 95b2a56

Browse files
Update doctest to use a dummy breakpoint.
1 parent a02c3d4 commit 95b2a56

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

mathics/builtin/system.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -882,12 +882,12 @@ class Breakpoint(Builtin):
882882
variable `PYTHONBREAKPOINT` can be utilized.
883883
</dl>
884884
885+
>> (* Test with a dummy breakpoint. *)
886+
>> SetEnvironment["PYTHONBREAKPOINT" -> "mathics.docpipeline.dummy_breakpoint"]
887+
Out[1]= SetEnvironment[PYTHONBREAKPOINT → mathics.docpipeline.dummy_breakpoint]
885888
>> Breakpoint[]
886-
--Return--
887-
> mathics/builtin/system.py(891)eval()->None
888-
-> breakpoint()
889-
(Pdb) c
890-
Out[1]= Breakpoint[]
889+
Dummy breakpoint() reached! Returning.
890+
Out[2]= Breakpoint[]
891891
"""
892892

893893
summary_text = "invoke a Python breakpoint()"

mathics/docpipeline.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
)
6161

6262

63+
# Dummy breakpoint for doctests
64+
def dummy_breakpoint():
65+
print("Dummy breakpoint() reached! Returning.")
66+
67+
6368
class TestOutput(Output):
6469
"""Output class for tests"""
6570

0 commit comments

Comments
 (0)