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

Method test_heading

Lib/test/test_ttk/test_widgets.py:1656–1670  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1654 self.assertRaises(tkinter.TclError, self.tv.focus, 'hi')
1655
1656 def test_heading(self):
1657 # check a dict is returned
1658 self.assertIsInstance(self.tv.heading('#0'), dict)
1659
1660 # check a value is returned
1661 self.tv.heading('#0', text='hi')
1662 self.assertEqual(self.tv.heading('#0', 'text'), 'hi')
1663 self.assertEqual(self.tv.heading('#0', text=None), 'hi')
1664
1665 # invalid option
1666 self.assertRaises(tkinter.TclError, self.tv.heading, '#0',
1667 background=None)
1668 # invalid value
1669 self.assertRaises(tkinter.TclError, self.tv.heading, '#0',
1670 anchor=1)
1671
1672 def test_heading_callback(self):
1673 def simulate_heading_click(x, y):

Callers

nothing calls this directly

Calls 4

assertIsInstanceMethod · 0.80
headingMethod · 0.45
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected