From a77a32b7d4367164faa4a48a38389bc4cfe97043 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Sat, 25 Jan 2025 16:26:37 +0000 Subject: [PATCH] [red-knot] Promote the `all_type_pairs_are_assignable_to_their_union` property test to stable (#15739) --- .../src/types/property_tests.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/red_knot_python_semantic/src/types/property_tests.rs b/crates/red_knot_python_semantic/src/types/property_tests.rs index dd599081d0..5f6e8edf06 100644 --- a/crates/red_knot_python_semantic/src/types/property_tests.rs +++ b/crates/red_knot_python_semantic/src/types/property_tests.rs @@ -467,6 +467,13 @@ mod stable { assignable_to_is_reflexive, db, forall types t. t.is_assignable_to(db, t) ); + + // For *any* pair of types, whether fully static or not, + // each of the pair should be assignable to the union of the two. + type_property_test!( + all_type_pairs_are_assignable_to_their_union, db, + forall types s, t. s.is_assignable_to(db, union(db, [s, t])) && t.is_assignable_to(db, union(db, [s, t])) + ); } /// This module contains property tests that currently lead to many false positives. @@ -515,13 +522,6 @@ mod flaky { forall types s, t. intersection(db, [s, t]).is_assignable_to(db, s) && intersection(db, [s, t]).is_assignable_to(db, t) ); - // For *any* pair of types, whether fully static or not, - // each of the pair should be assignable to the union of the two. - type_property_test!( - all_type_pairs_are_assignable_to_their_union, db, - forall types s, t. s.is_assignable_to(db, union(db, [s, t])) && t.is_assignable_to(db, union(db, [s, t])) - ); - // Equal element sets of intersections implies equivalence // flaky at least in part because of https://github.com/astral-sh/ruff/issues/15513 type_property_test!(