Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdece9c0

Browse files
miss-islingtonchrstphrchvzterryjreedyerlend-aasland
authored
[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 commit3cba61f)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>
1 parentf748fc9 commitdece9c0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

‎Lib/tkinter/test/test_tkinter/test_geometry_managers.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ def test_pack_configure_in(self):
108108
a.pack_configure(in_=c)
109109
self.assertEqual(pack.pack_slaves(), [b,c,d])
110110
self.assertEqual(c.pack_slaves(), [a])
111-
withself.assertRaisesRegex(TclError,
112-
'can\'t pack%s inside itself'% (a,)):
111+
withself.assertRaisesRegex(
112+
TclError,"""can't pack"?%s"? inside itself"""% (a,)):
113113
a.pack_configure(in_=a)
114114
withself.assertRaisesRegex(TclError,'bad window path name ".foo"'):
115115
a.pack_configure(in_='.foo')
@@ -292,8 +292,10 @@ def create2(self):
292292
deftest_place_configure_in(self):
293293
t,f,f2=self.create2()
294294
self.assertEqual(f2.winfo_manager(),'')
295-
withself.assertRaisesRegex(TclError,"can't place %s relative to "
296-
"itself"%re.escape(str(f2))):
295+
withself.assertRaisesRegex(
296+
TclError,
297+
"""can't place "?%s"? relative to itself"""
298+
%re.escape(str(f2))):
297299
f2.place_configure(in_=f2)
298300
self.assertEqual(f2.winfo_manager(),'')
299301
withself.assertRaisesRegex(TclError,'bad window path name'):
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update ``test_pack_configure_in`` and ``test_place_configure_in``
2+
for changes to error message formatting in Tk 8.7.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp