Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors #104495

Merged
merged 4 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Lib/test/test_tkinter/test_geometry_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def test_pack_configure_in(self):
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,)):
chrstphrchvz marked this conversation as resolved.
Show resolved Hide resolved
a.pack_configure(in_=a)
with self.assertRaisesRegex(TclError, 'bad window path name ".foo"'):
a.pack_configure(in_='.foo')
Expand Down Expand Up @@ -292,8 +292,9 @@ def create2(self):
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))):
chrstphrchvz marked this conversation as resolved.
Show resolved Hide resolved
f2.place_configure(in_=f2)
self.assertEqual(f2.winfo_manager(), '')
with self.assertRaisesRegex(TclError, 'bad window path name'):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update test_pack_configure_in and test_place_configure_in
terryjreedy marked this conversation as resolved.
Show resolved Hide resolved
for changes to error message formatting in Tk 8.7.