diff --git a/Lib/test/test_io/__init__.py b/Lib/test/test_io/__init__.py index c94fad3e779381..ab735e1538185f 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 a2b1ec8eb72bb1..d4cbfe446d9228 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