-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[red-knot] Add Property Tests for Intersection and Union #15415
[red-knot] Add Property Tests for Intersection and Union #15415
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of suggestions to also add some non-fully-static variations of these tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
## Summary Follow-up PR from #15415 🥲 The exact same property test already exists: `intersection_assignable_to_both` and `all_type_pairs_can_be_assigned_from_their_intersection` ## Test Plan `cargo test -p red_knot_python_semantic -- --ignored types::property_tests::flaky`
Summary
Closes #14986
stable tests
all_fully_static_type_pairs_are_subtype_of_their_union
flaky tests
negation_is_disjoint
all_fully_static_type_pairs_are_supertypes_of_their_union
all_type_pairs_can_be_assigned_from_their_intersection
all_type_pairs_are_assignable_to_their_union
The tests that are currently failing have been categorized as flaky. The failure of
fully_static_types_are_supertypes_of_their_intersection
seems a bit unusual, so I’ll take look into it and create a separate issue if needed. :)Test Plan
stable:
QUICKCHECK_TESTS=10000 cargo test -p red_knot_python_semantic -- --ignored types::property_tests::stable
flaky:
QUICKCHECK_TESTS=10000 cargo test -p red_knot_python_semantic -- --ignored types::property_tests::flaky