https://github.com/python/cpython/commit/15e37ea6b7f7070c112aa3118ba46325c4cfde2c
commit: 15e37ea6b7f7070c112aa3118ba46325c4cfde2c
branch: main
author: Cody Maloney <[email protected]>
committer: AA-Turner <[email protected]>
date: 2025-08-31T20:14:19+01:00
summary:

gh-138013: Make ``test.test_io`` into a package (#138153)

files:
A Lib/test/test_io/__init__.py
A Lib/test/test_io/__main__.py
A Lib/test/test_io/test_general.py
D Lib/test/test_io.py
M Makefile.pre.in

diff --git a/Lib/test/test_io/__init__.py b/Lib/test/test_io/__init__.py
new file mode 100644
index 00000000000000..4b16ecc31156a5
--- /dev/null
+++ b/Lib/test/test_io/__init__.py
@@ -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
index 00000000000000..40a23a297ec2b4
--- /dev/null
+++ b/Lib/test/test_io/__main__.py
@@ -0,0 +1,4 @@
+from . import load_tests
+import unittest
+
+unittest.main()
diff --git a/Lib/test/test_io.py b/Lib/test/test_io/test_general.py
similarity index 99%
rename from Lib/test/test_io.py
rename to Lib/test/test_io/test_general.py
index 92be2763e5ed1e..a56a2c0157f764 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io/test_general.py
@@ -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)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 9ce6ec65f142d8..eb07f66f14ffc5 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -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 \

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to