Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions 8 Doc/library/test.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions 4 Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.