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

Method test_winfo_pathname

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

Source from the content-addressed store, hash-verified

347 rgb((111, 78, 55))
348
349 def test_winfo_pathname(self):
350 t = tkinter.Toplevel(self.root)
351 w = tkinter.Button(t)
352 wid = w.winfo_id()
353 self.assertIsInstance(wid, int)
354 self.assertEqual(self.root.winfo_pathname(hex(wid)), str(w))
355 self.assertEqual(self.root.winfo_pathname(hex(wid), displayof=None), str(w))
356 self.assertEqual(self.root.winfo_pathname(hex(wid), displayof=t), str(w))
357 self.assertEqual(self.root.winfo_pathname(wid), str(w))
358 self.assertEqual(self.root.winfo_pathname(wid, displayof=None), str(w))
359 self.assertEqual(self.root.winfo_pathname(wid, displayof=t), str(w))
360
361 def test_event_repr_defaults(self):
362 e = tkinter.Event()

Callers

nothing calls this directly

Calls 5

strFunction · 0.85
winfo_idMethod · 0.80
assertIsInstanceMethod · 0.80
winfo_pathnameMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected