(self)
| 241 | self.assertEqual(b.winfo_reqheight(), 16) |
| 242 | |
| 243 | def test_element_create_image_errors(self): |
| 244 | style = self.style |
| 245 | image = tkinter.PhotoImage(master=self.root, width=10, height=10) |
| 246 | with self.assertRaises(IndexError): |
| 247 | style.element_create('block2', 'image') |
| 248 | with self.assertRaises(TypeError): |
| 249 | style.element_create('block2', 'image', image, 1) |
| 250 | with self.assertRaises(ValueError): |
| 251 | style.element_create('block2', 'image', image, ()) |
| 252 | with self.assertRaisesRegex(TclError, 'Invalid state name'): |
| 253 | style.element_create('block2', 'image', image, ('spam', image)) |
| 254 | with self.assertRaisesRegex(TclError, 'Invalid state name'): |
| 255 | style.element_create('block2', 'image', image, (1, image)) |
| 256 | with self.assertRaises(TypeError): |
| 257 | style.element_create('block2', 'image', image, ('pressed', 1, image)) |
| 258 | with self.assertRaises(TypeError): |
| 259 | style.element_create('block2', 'image', image, (1, 'selected', image)) |
| 260 | with self.assertRaisesRegex(TclError, 'bad option'): |
| 261 | style.element_create('block2', 'image', image, spam=1) |
| 262 | |
| 263 | def test_element_create_vsapi_1(self): |
| 264 | style = self.style |
nothing calls this directly
no test coverage detected