[Python-checkins] bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl (GH-26412) (GH-26888)

vstinner webhook-mailer at python.org
Thu Jun 24 08:12:16 EDT 2021


https://github.com/python/cpython/commit/733587011dbb47c2e461188f0574e1cc5288062a
commit: 733587011dbb47c2e461188f0574e1cc5288062a
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: vstinner <vstinner at python.org>
date: 2021-06-24T14:12:11+02:00
summary:

bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl (GH-26412) (GH-26888)

(cherry picked from commit e90e0422182f4ca7faefd19c629f84aebb34e2ee)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland at innova.no>

files:
M Lib/test/test_tcl.py

diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index cd3aacf6f8844..e7a60db777820 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -738,9 +738,9 @@ def check(value):
 
     @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):
 



More information about the Python-checkins mailing list