mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-12 18:22:53 +08:00
Change boolean result test to assert values
This commit is contained in:
parent
9c3897b3c0
commit
e1f652a81c
@ -124,9 +124,11 @@ class TestMathExpressionExecute:
|
|||||||
with pytest.raises(Exception, match="not defined"):
|
with pytest.raises(Exception, match="not defined"):
|
||||||
self._exec("str(a)", a=42)
|
self._exec("str(a)", a=42)
|
||||||
|
|
||||||
def test_boolean_result_raises(self):
|
def test_boolean_result(self):
|
||||||
with pytest.raises(ValueError, match="got bool"):
|
result = self._exec("a > b", a=5, b=3)
|
||||||
self._exec("a > b", a=5, b=3)
|
assert result[2] is True
|
||||||
|
result = self._exec("a > b", a=3, b=5)
|
||||||
|
assert result[2] is False
|
||||||
|
|
||||||
def test_empty_expression_raises(self):
|
def test_empty_expression_raises(self):
|
||||||
with pytest.raises(ValueError, match="Expression cannot be empty"):
|
with pytest.raises(ValueError, match="Expression cannot be empty"):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user