Skip to content

Commit 5106b91

Browse files
cmaloneyclaude
andauthored
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 <noreply@anthropic.com>
1 parent 149562e commit 5106b91

4 files changed

Lines changed: 13 additions & 12 deletions

File tree

‎Lib/test/test_io/__init__.py‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
Tests are split across multiple files to increase
44
parallelism and focus on specific implementation pieces.
55
6-
* test_io
7-
* test_bufferedio - tests file buffering
8-
* test_memoryio - tests BytesIO and StringIO
9-
* test_fileio - tests FileIO
10-
* test_file - tests the file interface
11-
* test_general - tests everything else in the io module
12-
* test_univnewlines - tests universal newline support
13-
* test_largefile - tests operations on a file greater than 2**32 bytes
14-
(only enabled with -ulargefile)
15-
* test_free_threading/test_io - tests thread safety of io objects
6+
Tests for code that uses io live with that code, for example:
7+
8+
* test_capi.test_file - the PyFile_* C API
9+
* test_builtin, test_print - open(), input() and print()
10+
* test_cmd_line, test_subprocess - stdio buffering and newlines at startup
11+
and through pipes
12+
* test_utf8_mode - UTF-8 mode encodings, including with _pyio
13+
* test_os, test_eintr - fd-level I/O and EINTR retries
1614
1715
.. attention::
1816
When writing tests for io, it's important to test both the C and Python
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
import io
33
import _pyio as pyio
44
import threading
5-
from unittest import TestCase
6-
from test.support import threading_helper
5+
from unittest import SkipTest, TestCase
6+
from test.support import Py_GIL_DISABLED, threading_helper
77
from test.support.threading_helper import run_concurrently
88
from random import randint
99
from sys import getsizeof
1010

11+
if not Py_GIL_DISABLED:
12+
raise SkipTest("GIL enabled")
13+
1114
threading_helper.requires_working_threading(module=True)
1215

1316

0 commit comments

Comments
 (0)