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

Method test_grid_content

Lib/test/test_tkinter/test_geometry_managers.py:907–922  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

905 self.assertEqual(self.root.grid_size(), (6, 5))
906
907 def test_grid_content(self):
908 self.assertEqual(self.root.grid_content(), [])
909 a = tkinter.Label(self.root)
910 a.grid_configure(row=0, column=1)
911 b = tkinter.Label(self.root)
912 b.grid_configure(row=1, column=0)
913 c = tkinter.Label(self.root)
914 c.grid_configure(row=1, column=1)
915 d = tkinter.Label(self.root)
916 d.grid_configure(row=1, column=1)
917 self.assertEqual(self.root.grid_content(), [d, c, b, a])
918 self.assertEqual(self.root.grid_content(row=0), [a])
919 self.assertEqual(self.root.grid_content(row=1), [d, c, b])
920 self.assertEqual(self.root.grid_content(column=0), [b])
921 self.assertEqual(self.root.grid_content(column=1), [d, c, a])
922 self.assertEqual(self.root.grid_content(row=1, column=1), [d, c])
923
924 def test_grid_slaves(self):
925 self.assertEqual(self.root.grid_slaves(), [])

Callers

nothing calls this directly

Calls 3

grid_contentMethod · 0.80
grid_configureMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected