Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reliance on unspecified behavior in test_disambiguators.py #642

Merged
merged 1 commit into from
Mar 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/test_disambiguators.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class G:

fn = create_default_dis_func(c, E, F, G)
assert fn({"op": 1}) is E
assert fn({"op": 0, "t": "MESSAGE_CREATE"}) is Union[F, G]
assert fn({"op": 0, "t": "MESSAGE_CREATE"}) == Union[F, G]

# can it handle multiple literals?
@define
Expand All @@ -224,8 +224,8 @@ class K:
a: Literal[0]

fn = create_default_dis_func(c, H, J, K)
assert fn({"a": 1}) is Union[H, J]
assert fn({"a": 0}) is Union[J, K]
assert fn({"a": 1}) == Union[H, J]
assert fn({"a": 0}) == Union[J, K]


def test_default_no_literals():
Expand Down