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

Method test_grid_remove

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

Source from the content-addressed store, hash-verified

762 self.assertEqual(info['sticky'], '')
763
764 def test_grid_remove(self):
765 b = tkinter.Button(self.root)
766 c = tkinter.Button(self.root)
767 b.grid_configure(row=2, column=2, rowspan=2, columnspan=2,
768 padx=3, pady=4, sticky='ns')
769 self.assertEqual(self.root.grid_content(), [b])
770 b.grid_remove()
771 c.grid_remove()
772 self.assertEqual(self.root.grid_content(), [])
773 self.assertEqual(b.grid_info(), {})
774 b.grid_configure(row=0, column=0)
775 info = b.grid_info()
776 self.assertEqual(info['row'], self._str(0))
777 self.assertEqual(info['column'], self._str(0))
778 self.assertEqual(info['rowspan'], self._str(2))
779 self.assertEqual(info['columnspan'], self._str(2))
780 self.assertEqual(info['padx'], self._str(3))
781 self.assertEqual(info['pady'], self._str(4))
782 self.assertEqual(info['sticky'], 'ns')
783
784 def test_grid_info(self):
785 b = tkinter.Button(self.root)

Callers

nothing calls this directly

Calls 6

grid_configureMethod · 0.80
grid_contentMethod · 0.80
grid_removeMethod · 0.80
grid_infoMethod · 0.80
assertEqualMethod · 0.45
_strMethod · 0.45

Tested by

no test coverage detected