FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-138013: Move I/O tests to test_io by cmaloney · Pull Request #138365 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (9) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
1 change: 1 addition & 0 deletions Lib/test/libregrtest/findtests.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"test_future_stmt",
"test_gdb",
"test_inspect",
"test_io",
"test_pydoc",
"test_multiprocessing_fork",
"test_multiprocessing_forkserver",
Expand Down
23 changes: 23 additions & 0 deletions Lib/test/test_io/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
"""Tests for the io module and its implementations (_io and _pyio)

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

.. attention::
When writing tests for io, it's important to test both the C and Python
implementations. This is usually done by writing a base test that refers to
the type it is testing as an attribute. Then it provides custom subclasses to
test both implementations. This directory contains lots of examples.
"""

import os
from test.support import load_package_tests

Expand Down
25 changes: 4 additions & 21 deletions Lib/test/test_io/test_general.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
"""Unit tests for the io module."""

# Tests of io are scattered over the test suite:
# * test_bufio - tests file buffering
# * test_memoryio - tests BytesIO and StringIO
# * test_fileio - tests FileIO
# * test_file - tests the file interface
# * 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)
# * test_free_threading/test_io - tests thread safety of io objects

################################################################################
# ATTENTION TEST WRITERS!!!
################################################################################
# When writing tests for io, it's important to test both the C and Python
# implementations. This is usually done by writing a base test that refers to
# the type it is testing as an attribute. Then it provides custom subclasses to
# test both implementations. This file has lots of examples.
################################################################################
"""General tests for the io module.

New tests should go in more specific modules; see test_io/__init__.py
"""

import abc
import array
Expand Down
Loading

Back | FazBrowse Home | New Git URL