mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -88,12 +88,10 @@ class SelectTestCase(unittest.TestCase):
|
|||
self.assertEqual(select.select([], a, []), ([], a[:5], []))
|
||||
|
||||
def test_disallow_instantiation(self):
|
||||
tp = type(select.poll())
|
||||
self.assertRaises(TypeError, tp)
|
||||
support.check_disallow_instantiation(self, type(select.poll()))
|
||||
|
||||
if hasattr(select, 'devpoll'):
|
||||
tp = type(select.devpoll())
|
||||
self.assertRaises(TypeError, tp)
|
||||
support.check_disallow_instantiation(self, type(select.devpoll()))
|
||||
|
||||
def tearDownModule():
|
||||
support.reap_children()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue