From: Cody Maloney Date: Sun, 31 Aug 2025 19:14:19 +0000 (-0700) Subject: gh-138013: Make ``test.test_io`` into a package (#138153) X-Git-Tag: v3.15.0a1~559 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15e37ea6b7f7070c112aa3118ba46325c4cfde2c;p=thirdparty%2FPython%2Fcpython.git gh-138013: Make ``test.test_io`` into a package (#138153) --- diff --git a/Lib/test/test_io/__init__.py b/Lib/test/test_io/__init__.py new file mode 100644 index 000000000000..4b16ecc31156 --- /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 000000000000..40a23a297ec2 --- /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 92be2763e5ed..a56a2c0157f7 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 9ce6ec65f142..eb07f66f14ff 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 \