]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-138013: Make ``test.test_io`` into a package (#138153)
authorCody Maloney <cmaloney@users.noreply.github.com>
Sun, 31 Aug 2025 19:14:19 +0000 (12:14 -0700)
committerGitHub <noreply@github.com>
Sun, 31 Aug 2025 19:14:19 +0000 (20:14 +0100)
Lib/test/test_io/__init__.py [new file with mode: 0644]
Lib/test/test_io/__main__.py [new file with mode: 0644]
Lib/test/test_io/test_general.py [moved from Lib/test/test_io.py with 99% similarity]
Makefile.pre.in

diff --git a/Lib/test/test_io/__init__.py b/Lib/test/test_io/__init__.py
new file mode 100644 (file)
index 0000000..4b16ecc
--- /dev/null
@@ -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)
diff --git a/Lib/test/test_io/__main__.py b/Lib/test/test_io/__main__.py
new file mode 100644 (file)
index 0000000..40a23a2
--- /dev/null
@@ -0,0 +1,4 @@
+from . import load_tests
+import unittest
+
+unittest.main()
similarity index 99%
rename from Lib/test/test_io.py
rename to Lib/test/test_io/test_general.py
index 92be2763e5ed1e366828326f915783abb4cb7726..a56a2c0157f76439c05db3fea4f7e438b1b50eb4 100644 (file)
@@ -5,7 +5,7 @@
 # * test_memoryio - tests BytesIO and StringIO
 # * test_fileio - tests FileIO
 # * test_file - tests the file interface
-# * test_io - tests everything else in the io module
+# * test_io.test_general - tests everything else in the io module
 # * test_univnewlines - tests universal newline support
 # * test_largefile - tests operations on a file greater than 2**32 bytes
 #     (only enabled with -ulargefile)
index 9ce6ec65f142d822c5eb62fb3d9065a43ae7f2ee..eb07f66f14ffc54170f50c113735e1e64e7f2d70 100644 (file)
@@ -2670,6 +2670,7 @@ TESTSUBDIRS=      idlelib/idle_test \
                test/test_importlib/source \
                test/test_inspect \
                test/test_interpreters \
+               test/test_io \
                test/test_json \
                test/test_module \
                test/test_multiprocessing_fork \