mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-43988: Document test.support.check_disallow_instantiation() (GH-26394)
This commit is contained in:
parent
dcb8786a98
commit
8cec740820
2 changed files with 10 additions and 2 deletions
|
@ -928,8 +928,16 @@ The :mod:`test.support` module defines the following functions:
|
|||
.. versionadded:: 3.10
|
||||
|
||||
|
||||
.. function:: check_disallow_instantiation(test_case, tp, *args, **kwds)
|
||||
|
||||
Assert that type *tp* cannot be instantiated using *args* and *kwds*.
|
||||
|
||||
.. versionadded:: 3.11
|
||||
|
||||
|
||||
The :mod:`test.support` module defines the following classes:
|
||||
|
||||
|
||||
.. class:: SuppressCrashReport()
|
||||
|
||||
A context manager used to try to prevent crash dialog popups on tests that
|
||||
|
|
|
@ -1987,9 +1987,9 @@ def skip_if_broken_multiprocessing_synchronize():
|
|||
|
||||
def check_disallow_instantiation(testcase, tp, *args, **kwds):
|
||||
"""
|
||||
Helper for testing types with the Py_TPFLAGS_DISALLOW_INSTANTIATION flag.
|
||||
Check that given type cannot be instantiated using *args and **kwds.
|
||||
|
||||
See bpo-43916.
|
||||
See bpo-43916: Add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag.
|
||||
"""
|
||||
mod = tp.__module__
|
||||
name = tp.__name__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue