8000 gh-108303: Move all doctest related files and tests to `Lib/test/test_doctest/` by sobolevn · Pull Request #112109 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 8 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-108303: Move all doctest related files and tests to `Lib/test/test…
…_doctest/`
  • Loading branch information
sobolevn committed Nov 15, 2023
commit 49a6473a42d65880c6adfd9249fae78ef5ae1ee3
1 change: 1 addition & 0 deletions Lib/test/libregrtest/findtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
SPLITTESTDIRS: set[TestName] = {
"test_asyncio",
"test_concurrent_futures",
"test_doctests",
"test_future_stmt",
"test_gdb",
"test_inspect",
Expand Down
5 changes: 5 additions & 0 deletions Lib/test/test_doctest/__init__.py
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)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def bar():
def test_silly_setup():
"""
>>> import test.test_doctest
>>> test.test_doctest.sillySetup
>>> import test.test_doctest.test_doctest
>>> test.test_doctest.test_doctest.sillySetup
True
"""

Expand Down
149 changes: 75 additions & 74 deletions Lib/test/test_doctest.py → Lib/test/test_doctest/test_doctest.py

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ This is a sample doctest in a text file.

In this example, we'll rely on some silly setup:

>>> import test.test_doctest
>>> test.test_doctest.sillySetup
>>> import test.test_doctest.test_doctest
>>> test.test_doctest.test_doctest.sillySetup
True

This test also has some (random) encoded (utf-8) unicode text:
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -2201,6 +2201,7 @@ TESTSUBDIRS= idlelib/idle_test \
test/test_cppext \
test/test_ctypes \
test/test_dataclasses \
test/test_doctest \
test/test_email \
test/test_email/data \
test/test_future_stmt \
Expand Down
0