]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl (GH-26412...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 24 Jun 2021 12:12:11 +0000 (05:12 -0700)
committerGitHub <noreply@github.com>
Thu, 24 Jun 2021 12:12:11 +0000 (14:12 +0200)
(cherry picked from commit e90e0422182f4ca7faefd19c629f84aebb34e2ee)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Lib/test/test_tcl.py

index cd3aacf6f8844c98749c6e9facbb978adb19b81d..e7a60db777820220229ea5b2e8c9d361607d2327 100644 (file)
@@ -738,9 +738,9 @@ class TclTest(unittest.TestCase):
 
     @support.cpython_only
     def test_new_tcl_obj(self):
-        self.assertRaises(TypeError, _tkinter.Tcl_Obj)
-        self.assertRaises(TypeError, _tkinter.TkttType)
-        self.assertRaises(TypeError, _tkinter.TkappType)
+        support.check_disallow_instantiation(self, _tkinter.Tcl_Obj)
+        support.check_disallow_instantiation(self, _tkinter.TkttType)
+        support.check_disallow_instantiation(self, _tkinter.TkappType)
 
 class BigmemTclTest(unittest.TestCase):