https://github.com/python/cpython/commit/5106b9195fefa8eb954741661c7b3362e20f0953
commit: 5106b9195fefa8eb954741661c7b3362e20f0953
branch: main
author: Cody Maloney <[email protected]>
committer: cmaloney <[email protected]>
date: 2026-11-06T15:31:21-08:00
summary:

gh-161458: Move test_winconsoleio and test_file_eintr into test_io (#161460)

* gh-161458: Move test_file_eintr into test_io
* gh-161458: Move test_winconsoleio into test_io
* gh-161458: Move test_free_threading/test_io into test_io as 
test_free_threading
* gh-161458: Skip test_io.test_free_threading on GIL builds

   The test_free_threading package skipped these on GIL builds.
* gh-161458: Remove the test module list from the test_io docstring

   It goes stale whenever a module is added or moved.
* gh-161458: Point to I/O tests outside test_io in its docstring

Co-authored-by: Claude Opus 5.5 <[email protected]>

files:
A Lib/test/test_io/test_file_eintr.py
A Lib/test/test_io/test_free_threading.py
A Lib/test/test_io/test_winconsoleio.py
D Lib/test/test_file_eintr.py
D Lib/test/test_free_threading/test_io.py
D Lib/test/test_winconsoleio.py
M Lib/test/test_io/__init__.py

diff --git a/Lib/test/test_io/__init__.py b/Lib/test/test_io/__init__.py
index c94fad3e779381d..ab735e1538185fa 100644
--- a/Lib/test/test_io/__init__.py
+++ b/Lib/test/test_io/__init__.py
@@ -3,16 +3,14 @@
 Tests are split across multiple files to increase
 parallelism and focus on specific implementation pieces.
 
-* test_io
-  * test_bufferedio - tests file buffering
-  * test_memoryio - tests BytesIO and StringIO
-  * test_fileio - tests FileIO
-  * test_file - tests the file interface
-  * 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)
-* test_free_threading/test_io - tests thread safety of io objects
+Tests for code that uses io live with that code, for example:
+
+* test_capi.test_file - the PyFile_* C API
+* test_builtin, test_print - open(), input() and print()
+* test_cmd_line, test_subprocess - stdio buffering and newlines at startup
+  and through pipes
+* test_utf8_mode - UTF-8 mode encodings, including with _pyio
+* test_os, test_eintr - fd-level I/O and EINTR retries
 
 .. attention::
    When writing tests for io, it's important to test both the C and Python
diff --git a/Lib/test/test_file_eintr.py b/Lib/test/test_io/test_file_eintr.py
similarity index 100%
rename from Lib/test/test_file_eintr.py
rename to Lib/test/test_io/test_file_eintr.py
diff --git a/Lib/test/test_free_threading/test_io.py 
b/Lib/test/test_io/test_free_threading.py
similarity index 98%
rename from Lib/test/test_free_threading/test_io.py
rename to Lib/test/test_io/test_free_threading.py
index a2b1ec8eb72bb1a..d4cbfe446d92285 100644
--- a/Lib/test/test_free_threading/test_io.py
+++ b/Lib/test/test_io/test_free_threading.py
@@ -2,12 +2,15 @@
 import io
 import _pyio as pyio
 import threading
-from unittest import TestCase
-from test.support import threading_helper
+from unittest import SkipTest, TestCase
+from test.support import Py_GIL_DISABLED, threading_helper
 from test.support.threading_helper import run_concurrently
 from random import randint
 from sys import getsizeof
 
+if not Py_GIL_DISABLED:
+    raise SkipTest("GIL enabled")
+
 threading_helper.requires_working_threading(module=True)
 
 
diff --git a/Lib/test/test_winconsoleio.py 
b/Lib/test/test_io/test_winconsoleio.py
similarity index 100%
rename from Lib/test/test_winconsoleio.py
rename to Lib/test/test_io/test_winconsoleio.py

_______________________________________________
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