mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (#104495)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
9d41f83c58
commit
3cba61f111
2 changed files with 8 additions and 4 deletions
|
@ -108,8 +108,8 @@ class PackTest(AbstractWidgetTest, unittest.TestCase):
|
|||
a.pack_configure(in_=c)
|
||||
self.assertEqual(pack.pack_slaves(), [b, c, d])
|
||||
self.assertEqual(c.pack_slaves(), [a])
|
||||
with self.assertRaisesRegex(TclError,
|
||||
'can\'t pack %s inside itself' % (a,)):
|
||||
with self.assertRaisesRegex(
|
||||
TclError, """can't pack "?%s"? inside itself""" % (a,)):
|
||||
a.pack_configure(in_=a)
|
||||
with self.assertRaisesRegex(TclError, 'bad window path name ".foo"'):
|
||||
a.pack_configure(in_='.foo')
|
||||
|
@ -292,8 +292,10 @@ class PlaceTest(AbstractWidgetTest, unittest.TestCase):
|
|||
def test_place_configure_in(self):
|
||||
t, f, f2 = self.create2()
|
||||
self.assertEqual(f2.winfo_manager(), '')
|
||||
with self.assertRaisesRegex(TclError, "can't place %s relative to "
|
||||
"itself" % re.escape(str(f2))):
|
||||
with self.assertRaisesRegex(
|
||||
TclError,
|
||||
"""can't place "?%s"? relative to itself"""
|
||||
% re.escape(str(f2))):
|
||||
f2.place_configure(in_=f2)
|
||||
self.assertEqual(f2.winfo_manager(), '')
|
||||
with self.assertRaisesRegex(TclError, 'bad window path name'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue