Skip to content

Commit 8cec740

Browse files
author
Erlend Egeberg Aasland
authored
bpo-43988: Document test.support.check_disallow_instantiation() (GH-26394)
1 parent dcb8786 commit 8cec740

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Doc/library/test.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,8 +928,16 @@ The :mod:`test.support` module defines the following functions:
928928
.. versionadded:: 3.10
929929

930930

931+
.. function:: check_disallow_instantiation(test_case, tp, *args, **kwds)
932+
933+
Assert that type *tp* cannot be instantiated using *args* and *kwds*.
934+
935+
.. versionadded:: 3.11
936+
937+
931938
The :mod:`test.support` module defines the following classes:
932939

940+
933941
.. class:: SuppressCrashReport()
934942

935943
A context manager used to try to prevent crash dialog popups on tests that

Lib/test/support/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1987,9 +1987,9 @@ def skip_if_broken_multiprocessing_synchronize():
19871987

19881988
def check_disallow_instantiation(testcase, tp, *args, **kwds):
19891989
"""
1990-
Helper for testing types with the Py_TPFLAGS_DISALLOW_INSTANTIATION flag.
1990+
Check that given type cannot be instantiated using *args and **kwds.
19911991
1992-
See bpo-43916.
1992+
See bpo-43916: Add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag.
19931993
"""
19941994
mod = tp.__module__
19951995
name = tp.__name__

0 commit comments

Comments
 (0)