MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / test_IntValidatorStrict

Function test_IntValidatorStrict

pyxrf/gui_module/tests/test_useful_widgets.py:39–43  ·  view source on GitHub ↗
(text, range, result)

Source from the content-addressed store, hash-verified

37@pytest.mark.xfail(reason="Test fails with PyQT 5.9: remove 'xfail' once transition to conda-forge is complete")
38# fmt: on
39def test_IntValidatorStrict(text, range, result):
40 validator = IntValidatorStrict()
41 if range is not None:
42 validator.setRange(range[0], range[1])
43 assert validator.validate(text, 0)[0] == result, "Validation failed"
44
45
46# ==============================================================

Callers

nothing calls this directly

Calls 2

validateMethod · 0.95
IntValidatorStrictClass · 0.90

Tested by

no test coverage detected