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

Method test_configure_format

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

Source from the content-addressed store, hash-verified

1323 self.assertEqual(self.spin.get(), '3')
1324
1325 def test_configure_format(self):
1326 self.spin.set(1)
1327 self.spin['format'] = '%10.3f'
1328 self.spin.update()
1329 self._click_increment_arrow()
1330 value = self.spin.get()
1331
1332 self.assertEqual(len(value), 10)
1333 self.assertEqual(value.index('.'), 6)
1334
1335 self.spin['format'] = ''
1336 self.spin.update()
1337 self._click_increment_arrow()
1338 value = self.spin.get()
1339 self.assertTrue('.' not in value)
1340 self.assertEqual(len(value), 1)
1341
1342 def test_configure_wrap(self):
1343 self.spin['to'] = 10

Callers

nothing calls this directly

Calls 7

assertTrueMethod · 0.80
setMethod · 0.45
updateMethod · 0.45
getMethod · 0.45
assertEqualMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected