Test item check "values" evaluation removed.

This commit is contained in:
2026-02-09 19:40:07 +01:00
parent f143a9aa3f
commit 04ee42eaa7
3 changed files with 9 additions and 14 deletions

View File

@@ -40,17 +40,12 @@ class TestItemCheckValue(TestItem):
#test core function #test core function
for v in self._action_list: for v in self._action_list:
val = self._prms.expanse(v) val = self._prms.expanse(v)
is_evaluated, ev = evaluate(val) if not isinstance(val, bool):
if not is_evaluated: self.result.set(TestValue.FAILURE, f"The expanse of '{v}' must result in a boolean, but it resulted in '{val}'")
self.result.set(TestValue.FAILURE, "Error evaluating: '{}'".format(val))
return return
if v != val:
if not isinstance(ev, bool): print("Evaluation of '{}' --> {}.".format(v, val))
self.result.set(TestValue.FAILURE, "The check of '{}' must result in a boolean: ".format(v)) if not val:
return
print("Evaluation of '{}' --> '{}' is {}.".format(v, val, str(ev)))
if not ev:
is_success = False is_success = False
if is_success: if is_success:

View File

@@ -19,10 +19,10 @@
name: Check condition on existing variable (PASS) name: Check condition on existing variable (PASS)
key: $(test)_PASS key: $(test)_PASS
values: values:
- $(pfn_Dummy_int) > 1 - $| $(pfn_Dummy_int) > 1 |
- check: - check:
name: Check condition on existing variable (FAIL) name: Check condition on existing variable (FAIL)
key: $(test)_FAIL key: $(test)_FAIL
values: values:
- '"tailor" in "$(pfn_Dummy_str)"' - $| "tailor" in "$(pfn_Dummy_str)" |

View File

@@ -39,7 +39,7 @@
name: Check complex variables expansion is correct (PASS) name: Check complex variables expansion is correct (PASS)
key: $(test)_PASS key: $(test)_PASS
values: values:
- $(expanse_complex) == 38 - $| $(expanse_complex) == 38 |
- let: - let:
name: Variables expansion in object name: Variables expansion in object
@@ -61,4 +61,4 @@
name: Check complex variables expansion is correct (PASS) name: Check complex variables expansion is correct (PASS)
key: $(test)_PASS key: $(test)_PASS
values: values:
- '$(expanse_object) == [{"a": 6, "b": 8}, {"blo": [18, 25]}]' - '$| $(expanse_object) == [{"a": 6, "b": 8}, {"blo": [18, 25]}] |'