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

Method validate

Lib/test/test_ttk/test_widgets.py:426–431  ·  view source on GitHub ↗
(to_insert)

Source from the content-addressed store, hash-verified

424 def test_validation(self):
425 validation = []
426 def validate(to_insert):
427 if not 'a' <= to_insert.lower() <= 'z':
428 validation.append(False)
429 return False
430 validation.append(True)
431 return True
432
433 self.entry['validate'] = 'key'
434 self.entry['validatecommand'] = self.entry.register(validate), '%S'

Callers 2

test_revalidationMethod · 0.45

Calls 2

lowerMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected