Skip to content

Commit c570b54

Browse files
committed
Fix test
1 parent dba3f8c commit c570b54

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyiceberg/expressions/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def handle_primitive_type(cls, v: Any, handler: ValidatorFunctionWrapHandler) ->
7979

8080
# Handle different input formats
8181
if isinstance(v, bool):
82-
return AlwaysTrue() if v else AlwaysFalse()
82+
return AlwaysTrue() if v is True else AlwaysFalse()
8383

8484
if isinstance(v, dict) and (field_type := v.get("type")):
8585
# Unary

tests/expressions/test_expressions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ def test_always_true() -> None:
788788
def test_always_false() -> None:
789789
always_false = AlwaysFalse()
790790
assert always_false.model_dump_json() == "false"
791-
assert BooleanExpression.model_validate_json("true") == always_false
791+
assert BooleanExpression.model_validate_json("false") == always_false
792792
assert str(always_false) == "AlwaysFalse()"
793793
assert repr(always_false) == "AlwaysFalse()"
794794
assert always_false == eval(repr(always_false))

0 commit comments

Comments
 (0)