Skip to content

Commit

Permalink
pythongh-108303: Move all doctest related files and tests to `Lib/tes…
Browse files Browse the repository at this point in the history
…t/test_doctest/`
  • Loading branch information
sobolevn committed Nov 15, 2023
1 parent d4f83e1 commit 49a6473
Show file tree
Hide file tree
Showing 14 changed files with 86 additions and 78 deletions.
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
File renamed without changes.
File renamed without changes.
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 comments on commit 49a6473

Please sign in to comment.