mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
[3.10] bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757) (GH-26885)
(cherry picked from commit4f725261c6
,fbff5387c3
, and8cec740820
) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Automerge-Triggered-By: GH:vstinner
This commit is contained in:
parent
ece3841d3d
commit
0a3452e7cf
16 changed files with 58 additions and 53 deletions
|
@ -6,7 +6,8 @@ import sys
|
|||
import tempfile
|
||||
import unittest
|
||||
|
||||
from test.support import requires, verbose, SaveSignals, cpython_only
|
||||
from test.support import (requires, verbose, SaveSignals, cpython_only,
|
||||
check_disallow_instantiation)
|
||||
from test.support.import_helper import import_module
|
||||
|
||||
# Optionally test curses module. This currently requires that the
|
||||
|
@ -1052,7 +1053,7 @@ class TestCurses(unittest.TestCase):
|
|||
# Ensure that the type disallows instantiation (bpo-43916)
|
||||
w = curses.newwin(10, 10)
|
||||
panel = curses.panel.new_panel(w)
|
||||
self.assertRaises(TypeError, type(panel))
|
||||
check_disallow_instantiation(self, type(panel))
|
||||
|
||||
@requires_curses_func('is_term_resized')
|
||||
def test_is_term_resized(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue