Fix unittests for funcparser refactor
This commit is contained in:
parent
a3a57314a1
commit
7891987e05
6 changed files with 68 additions and 312 deletions
|
|
@ -177,9 +177,7 @@ def _set_property(caller, raw_string, **kwargs):
|
|||
|
||||
if kwargs.get("test_parse", True):
|
||||
out.append(" Simulating prototype-func parsing ...")
|
||||
err, parsed_value = protlib.protfunc_parser(value, testing=True)
|
||||
if err:
|
||||
out.append(" |yPython `literal_eval` warning: {}|n".format(err))
|
||||
parsed_value = protlib.protfunc_parser(value, testing=True, prototype=prototype)
|
||||
if parsed_value != value:
|
||||
out.append(
|
||||
" |g(Example-)value when parsed ({}):|n {}".format(type(parsed_value), parsed_value)
|
||||
|
|
@ -264,7 +262,7 @@ def _validate_prototype(prototype):
|
|||
def _format_protfuncs():
|
||||
out = []
|
||||
sorted_funcs = [
|
||||
(key, func) for key, func in sorted(protlib.PROT_FUNCS.items(), key=lambda tup: tup[0])
|
||||
(key, func) for key, func in sorted(protlib.FUNC_PARSER.callables.items(), key=lambda tup: tup[0])
|
||||
]
|
||||
for protfunc_name, protfunc in sorted_funcs:
|
||||
out.append(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue