def _number_build_fail(cfg, expected): with raises(Exception) as got: builtin.number(cfg) assert_exception_correct(got.value, expected)
def _number_validate_fail(cfg, meta, expected): assert builtin.number(cfg)('key', meta) == expected
def _number_success(cfg, params): assert builtin.number(cfg)('key', params) is None