MCPcopy Index your code
hub / github.com/python/cpython / test_tk_busy

Method test_tk_busy

Lib/test/test_tkinter/test_misc.py:52–84  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50
51 @requires_tk(8, 6, 6)
52 def test_tk_busy(self):
53 root = self.root
54 f = tkinter.Frame(root, name='myframe')
55 f2 = tkinter.Frame(root)
56 f.pack()
57 f2.pack()
58 b = tkinter.Button(f)
59 b.pack()
60 f.tk_busy_hold()
61 with self.assertRaisesRegex(TclError, 'unknown option "-spam"'):
62 f.tk_busy_configure(spam='eggs')
63 with self.assertRaisesRegex(TclError, 'unknown option "-spam"'):
64 f.tk_busy_cget('spam')
65 with self.assertRaisesRegex(TclError, 'unknown option "-spam"'):
66 f.tk_busy_configure('spam')
67 self.assertIsInstance(f.tk_busy_configure(), dict)
68
69 self.assertTrue(f.tk_busy_status())
70 self.assertFalse(root.tk_busy_status())
71 self.assertFalse(f2.tk_busy_status())
72 self.assertFalse(b.tk_busy_status())
73 self.assertIn(f, f.tk_busy_current())
74 self.assertIn(f, f.tk_busy_current('*.m?f*me'))
75 self.assertNotIn(f, f.tk_busy_current('*spam'))
76
77 f.tk_busy_forget()
78 self.assertFalse(f.tk_busy_status())
79 self.assertFalse(f.tk_busy_current())
80 errmsg = r"can(no|')t find busy window.*"
81 with self.assertRaisesRegex(TclError, errmsg):
82 f.tk_busy_configure()
83 with self.assertRaisesRegex(TclError, errmsg):
84 f.tk_busy_forget()
85
86 @requires_tk(8, 6, 6)
87 def test_tk_busy_with_cursor(self):

Callers

nothing calls this directly

Calls 13

tk_busy_holdMethod · 0.80
assertRaisesRegexMethod · 0.80
tk_busy_configureMethod · 0.80
tk_busy_cgetMethod · 0.80
assertIsInstanceMethod · 0.80
assertTrueMethod · 0.80
tk_busy_statusMethod · 0.80
assertFalseMethod · 0.80
assertInMethod · 0.80
tk_busy_currentMethod · 0.80
assertNotInMethod · 0.80
tk_busy_forgetMethod · 0.80

Tested by

no test coverage detected