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

Method _test_option_smooth

Lib/test/test_tkinter/test_widgets.py:858–871  ·  view source on GitHub ↗
(self, c, factory)

Source from the content-addressed store, hash-verified

856 self.assertRaises(TclError, factory, joinstyle='spam')
857
858 def _test_option_smooth(self, c, factory):
859 for smooth in 1, True, '1', 'true', 'yes', 'on':
860 i = factory(smooth=smooth)
861 self.assertEqual(c.itemcget(i, 'smooth'), 'true')
862 for smooth in 0, False, '0', 'false', 'no', 'off':
863 i = factory(smooth=smooth)
864 self.assertEqual(c.itemcget(i, 'smooth'), '0')
865 i = factory(smooth=True, splinestep=30)
866 self.assertEqual(c.itemcget(i, 'smooth'), 'true')
867 self.assertEqual(c.itemcget(i, 'splinestep'), '30')
868 i = factory(smooth='raw', splinestep=30)
869 self.assertEqual(c.itemcget(i, 'smooth'), 'raw')
870 self.assertEqual(c.itemcget(i, 'splinestep'), '30')
871 self.assertRaises(TclError, factory, smooth='spam')
872
873 def test_create_rectangle(self):
874 c = self.create()

Callers 2

test_create_lineMethod · 0.95
test_create_polygonMethod · 0.95

Calls 4

factoryFunction · 0.50
assertEqualMethod · 0.45
itemcgetMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected