mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.11] gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (GH-104495) (#104569)
gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (GH-104495)
(cherry picked from commit 3cba61f111
)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
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
f748fc9f44
commit
dece9c06bb
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'):
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Update ``test_pack_configure_in`` and ``test_place_configure_in``
|
||||
for changes to error message formatting in Tk 8.7.
|
Loading…
Add table
Add a link
Reference in a new issue