-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-108303: Move all doctest related files and tests to Lib/test/test_doctest/
#112109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
49a6473
ca8a1f6
5f731f5
2774675
33c801b
a13b649
a9342bc
de38766
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,23 @@ def terminate(proc): | |
input = b"" # Stop writing | ||
if not input: | ||
sel.modify(master, selectors.EVENT_READ) | ||
|
||
|
||
###################################################################### | ||
## Fake stdin (for testing interactive debugging) | ||
###################################################################### | ||
|
||
class FakeInput: | ||
""" | ||
A fake input stream for pdb'sx interactive debugger. Whenever a | ||
line is read, print it (to simulate the user typing it), and then | ||
return it. The set of lines to return is specified in the | ||
constructor; they should not have trailing newlines. | ||
""" | ||
def __init__(self, lines): | ||
self.lines = lines | ||
|
||
def readline(self): | ||
line = self.lines.pop(0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Calling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is usually used in cases like |
||
print(line) | ||
return line+'\n' | ||
sobolevn marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import os | ||
from test.support import load_package_tests | ||
|
||
def load_tests(*args): | ||
return load_package_tests(os.path.dirname(__file__), *args) |
Uh oh!
There was an error while loading. Please reload this page.