Did I find the right examples for you? yes no

All Samples(39)  |  Call(39)  |  Derive(0)  |  Import(0)

src/c/p/cpython-HEAD/Lib/tkinter/test/test_tkinter/test_geometry_managers.py   cpython(Download)
    def test_grid_configure(self):
        b = tkinter.Button(self.root)
        self.addCleanup(b.destroy)
        self.assertEqual(b.grid_info(), {})
        b.grid_configure()
        self.assertEqual(b.grid_info()['in'], self.root)
        self.assertEqual(b.grid_info()['column'], self._str(0))
        self.assertEqual(b.grid_info()['row'], self._str(0))
        b.grid_configure({'column': 1}, row=2)
    def test_grid_configure_column(self):
        b = tkinter.Button(self.root)
        with self.assertRaisesRegex(TclError, 'bad column value "-1": '
                                    'must be a non-negative integer'):
            b.grid_configure(column=-1)
        b.grid_configure(column=2)
    def test_grid_configure_columnspan(self):
        b = tkinter.Button(self.root)
        with self.assertRaisesRegex(TclError, 'bad columnspan value "0": '
                                    'must be a positive integer'):
            b.grid_configure(columnspan=0)