Skip to content

Commit 2813375

Browse files
committed
Add thread_unsafe to __all__ and test.rst
1 parent ff6b286 commit 2813375

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Doc/library/test.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,11 @@ The :mod:`test.support` module defines the following functions:
792792
Decorator for invoking :func:`check_impl_detail` on *guards*. If that
793793
returns ``False``, then uses *msg* as the reason for skipping the test.
794794

795+
.. decorator:: thread_unsafe(reason=None)
796+
797+
Decorator for marking tests as thread-unsafe. This test always runs in one
798+
thread even when invoked with ``--parallel-threads``.
799+
795800

796801
.. decorator:: no_tracing
797802

Lib/test/support/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"anticipate_failure", "load_package_tests", "detect_api_mismatch",
4141
"check__all__", "skip_if_buggy_ucrt_strfptime",
4242
"check_disallow_instantiation", "check_sanitizer", "skip_if_sanitizer",
43-
"requires_limited_api", "requires_specialization",
43+
"requires_limited_api", "requires_specialization", "thread_unsafe",
4444
# sys
4545
"MS_WINDOWS", "is_jython", "is_android", "is_emscripten", "is_wasi",
4646
"is_apple_mobile", "check_impl_detail", "unix_shell", "setswitchinterval",

0 commit comments

Comments
 (0)