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
for v in self._action_list:
val = self._prms.expanse(v)
is_evaluated, ev = evaluate(val)
if not is_evaluated:
self.result.set(TestValue.FAILURE, "Error evaluating: '{}'".format(val))
if not isinstance(val, bool):
self.result.set(TestValue.FAILURE, f"The expanse of '{v}' must result in a boolean, but it resulted in '{val}'")
return
if not isinstance(ev, bool):
self.result.set(TestValue.FAILURE, "The check of '{}' must result in a boolean: ".format(v))
return
print("Evaluation of '{}' --> '{}' is {}.".format(v, val, str(ev)))
if not ev:
if v != val:
print("Evaluation of '{}' --> {}.".format(v, val))
if not val:
is_success = False
if is_success:

View File

@@ -19,10 +19,10 @@
name: Check condition on existing variable (PASS)
key: $(test)_PASS
values:
- $(pfn_Dummy_int) > 1
- $| $(pfn_Dummy_int) > 1 |
- check:
name: Check condition on existing variable (FAIL)
key: $(test)_FAIL
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)
key: $(test)_PASS
values:
- $(expanse_complex) == 38
- $| $(expanse_complex) == 38 |
- let:
name: Variables expansion in object
@@ -61,4 +61,4 @@
name: Check complex variables expansion is correct (PASS)
key: $(test)_PASS
values:
- '$(expanse_object) == [{"a": 6, "b": 8}, {"blo": [18, 25]}]'
- '$| $(expanse_object) == [{"a": 6, "b": 8}, {"blo": [18, 25]}] |'