@@ -108,8 +108,8 @@ def test_pack_configure_in(self):
108
108
a .pack_configure (in_ = c )
109
109
self .assertEqual (pack .pack_slaves (), [b , c , d ])
110
110
self .assertEqual (c .pack_slaves (), [a ])
111
- with self .assertRaisesRegex (TclError ,
112
- ' can\ ' t pack %s inside itself' % (a ,)):
111
+ with self .assertRaisesRegex (
112
+ TclError , """ can't pack "?%s"? inside itself""" % (a ,)):
113
113
a .pack_configure (in_ = a )
114
114
with self .assertRaisesRegex (TclError , 'bad window path name ".foo"' ):
115
115
a .pack_configure (in_ = '.foo' )
@@ -292,8 +292,10 @@ def create2(self):
292
292
def test_place_configure_in (self ):
293
293
t , f , f2 = self .create2 ()
294
294
self .assertEqual (f2 .winfo_manager (), '' )
295
- with self .assertRaisesRegex (TclError , "can't place %s relative to "
296
- "itself" % re .escape (str (f2 ))):
295
+ with self .assertRaisesRegex (
296
+ TclError ,
297
+ """can't place "?%s"? relative to itself"""
298
+ % re .escape (str (f2 ))):
297
299
f2 .place_configure (in_ = f2 )
298
300
self .assertEqual (f2 .winfo_manager (), '' )
299
301
with self .assertRaisesRegex (TclError , 'bad window path name' ):
0 commit comments