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

Method check_itemconfigure

Lib/test/test_tkinter/test_widgets.py:1116–1123  ·  view source on GitHub ↗
(self, name, value)

Source from the content-addressed store, hash-verified

1114 self.assertEqual(v[4], widget.itemcget(0, k))
1115
1116 def check_itemconfigure(self, name, value):
1117 widget = self.create()
1118 widget.insert('end', 'a', 'b', 'c', 'd')
1119 widget.itemconfigure(0, **{name: value})
1120 self.assertEqual(widget.itemconfigure(0, name)[4], value)
1121 self.assertEqual(widget.itemcget(0, name), value)
1122 with self.assertRaisesRegex(TclError, 'unknown color name "spam"'):
1123 widget.itemconfigure(0, **{name: 'spam'})
1124
1125 def test_itemconfigure_background(self):
1126 self.check_itemconfigure('background', '#ff0000')

Calls 6

createMethod · 0.95
assertRaisesRegexMethod · 0.80
insertMethod · 0.45
itemconfigureMethod · 0.45
assertEqualMethod · 0.45
itemcgetMethod · 0.45

Tested by

no test coverage detected