Skip to content

[DSL] Add mulitple operators#3336

Merged
Herklos merged 1 commit intodevfrom
feature/add-dsl-multi-operations
Mar 24, 2026
Merged

[DSL] Add mulitple operators#3336
Herklos merged 1 commit intodevfrom
feature/add-dsl-multi-operations

Conversation

@Herklos
Copy link
Member

@Herklos Herklos commented Mar 24, 2026

No description provided.

@Herklos Herklos self-assigned this Mar 24, 2026
@Herklos Herklos requested a review from GuillaumeDSM as a code owner March 24, 2026 07:44
@Herklos Herklos enabled auto-merge (rebase) March 24, 2026 07:45
Copy link
Member

@GuillaumeDSM GuillaumeDSM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +641 to +648
async def test_single_comparison(interpreter):
assert await interpreter.interprete("1 < 2") is True
assert await interpreter.interprete("2 < 1") is False
assert await interpreter.interprete("5 <= 5") is True
assert await interpreter.interprete("5 >= 5") is True
assert await interpreter.interprete("5 > 3") is True
assert await interpreter.interprete("3 == 3") is True
assert await interpreter.interprete("3 != 4") is True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is already covered in test_interpreter_basic_operations

Comment on lines +713 to +718
async def test_chained_comparison_with_is_not(interpreter):
# x is not None and 0 < x <= 300000
# This mirrors the original failing DSL script pattern
assert await interpreter.interprete("100 is not None") is True
assert await interpreter.interprete("None is None") is True
assert await interpreter.interprete("None is not None") is False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is already covered in test_interpreter_basic_operations

Comment on lines +731 to +738
async def test_chained_comparison_combined_with_bool_ops(interpreter):
# chained comparison inside a boolean expression
# (0 < 5 <= 10) and (1 < 2) => True and True => True
assert await interpreter.interprete("0 < 5 <= 10 and 1 < 2") is True
# (0 < 5 <= 10) and (2 < 1) => True and False => False
assert await interpreter.interprete("0 < 5 <= 10 and 2 < 1") is False
# (0 < 15 <= 10) or (1 < 2) => False or True => True
assert await interpreter.interprete("0 < 15 <= 10 or 1 < 2") is True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is already covered in test_interpreter_mixed_basic_operations

@Herklos Herklos force-pushed the feature/add-dsl-multi-operations branch from 746e330 to 0c087f3 Compare March 24, 2026 08:12
@Herklos
Copy link
Member Author

Herklos commented Mar 24, 2026

Thanks! It's up

Copy link
Member

@GuillaumeDSM GuillaumeDSM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Signed-off-by: Herklos <herklos@drakkar.software>
@Herklos Herklos force-pushed the feature/add-dsl-multi-operations branch from 0c087f3 to abf164b Compare March 24, 2026 08:20
@Herklos Herklos merged commit 9e8e051 into dev Mar 24, 2026
21 checks passed
@Herklos Herklos deleted the feature/add-dsl-multi-operations branch March 24, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants