From 04ee42eaa732fdb88bd32407e7de54bab94fb1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Mon, 9 Feb 2026 19:40:07 +0100 Subject: [PATCH] Test item check "values" evaluation removed. --- .../interpreter/test_items/test_item_check.py | 15 +++++---------- test/validation/items/check/test.tum | 4 ++-- test/validation/items/expanse/test.tum | 4 ++-- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/testium/interpreter/test_items/test_item_check.py b/src/testium/interpreter/test_items/test_item_check.py index 3886cbb..200f1e3 100644 --- a/src/testium/interpreter/test_items/test_item_check.py +++ b/src/testium/interpreter/test_items/test_item_check.py @@ -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: diff --git a/test/validation/items/check/test.tum b/test/validation/items/check/test.tum index e2459b2..f9c7bd3 100644 --- a/test/validation/items/check/test.tum +++ b/test/validation/items/check/test.tum @@ -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)"' \ No newline at end of file + - $| "tailor" in "$(pfn_Dummy_str)" | \ No newline at end of file diff --git a/test/validation/items/expanse/test.tum b/test/validation/items/expanse/test.tum index 1180b5a..b8bd816 100644 --- a/test/validation/items/expanse/test.tum +++ b/test/validation/items/expanse/test.tum @@ -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]}] |'