@@ -1279,6 +1279,8 @@ def __post_init__(self, init_param):
12791279 c = C (init_param = 10 )
12801280 self .assertEqual (c .x , 20 )
12811281
1282+ # TODO: RUSTPYTHON
1283+ @unittest .expectedFailure
12821284 def test_init_var_preserve_type (self ):
12831285 self .assertEqual (InitVar [int ].type , int )
12841286
@@ -1537,6 +1539,8 @@ class B:
15371539 with self .assertRaisesRegex (TypeError , 'should be called on dataclass instances' ):
15381540 replace (obj , x = 0 )
15391541
1542+ # TODO: RUSTPYTHON
1543+ @unittest .expectedFailure
15401544 def test_is_dataclass_genericalias (self ):
15411545 @dataclass
15421546 class A (types .GenericAlias ):
@@ -1775,6 +1779,8 @@ class C:
17751779 self .assertIsNot (d ['f' ], t )
17761780 self .assertEqual (d ['f' ].my_a (), 6 )
17771781
1782+ # TODO: RUSTPYTHON
1783+ @unittest .expectedFailure
17781784 def test_helper_asdict_defaultdict (self ):
17791785 # Ensure asdict() does not throw exceptions when a
17801786 # defaultdict is a member of a dataclass
@@ -1917,6 +1923,8 @@ class C:
19171923 t = astuple (c , tuple_factory = list )
19181924 self .assertEqual (t , ['outer' , T (1 , ['inner' , T (11 , 12 , 13 )], 2 )])
19191925
1926+ # TODO: RUSTPYTHON
1927+ @unittest .expectedFailure
19201928 def test_helper_astuple_defaultdict (self ):
19211929 # Ensure astuple() does not throw exceptions when a
19221930 # defaultdict is a member of a dataclass
@@ -2327,13 +2335,17 @@ class C:
23272335
23282336 self .assertDocStrEqual (C .__doc__ , "C(x:List[int]=<factory>)" )
23292337
2338+ # TODO: RUSTPYTHON
2339+ @unittest .expectedFailure
23302340 def test_docstring_deque_field (self ):
23312341 @dataclass
23322342 class C :
23332343 x : deque
23342344
23352345 self .assertDocStrEqual (C .__doc__ , "C(x:collections.deque)" )
23362346
2347+ # TODO: RUSTPYTHON
2348+ @unittest .expectedFailure
23372349 def test_docstring_deque_field_with_default_factory (self ):
23382350 @dataclass
23392351 class C :
@@ -3073,6 +3085,8 @@ class C:
30733085
30743086
30753087class TestSlots (unittest .TestCase ):
3088+ # TODO: RUSTPYTHON
3089+ @unittest .expectedFailure
30763090 def test_simple (self ):
30773091 @dataclass
30783092 class C :
@@ -3114,6 +3128,8 @@ class Derived(Base):
31143128 # We can add a new field to the derived instance.
31153129 d .z = 10
31163130
3131+ # TODO: RUSTPYTHON
3132+ @unittest .expectedFailure
31173133 def test_generated_slots (self ):
31183134 @dataclass (slots = True )
31193135 class C :
@@ -3318,6 +3334,8 @@ class A:
33183334 self .assertEqual (obj .a , 'a' )
33193335 self .assertEqual (obj .b , 'b' )
33203336
3337+ # TODO: RUSTPYTHON
3338+ @unittest .expectedFailure
33213339 def test_slots_no_weakref (self ):
33223340 @dataclass (slots = True )
33233341 class A :
@@ -3332,6 +3350,8 @@ class A:
33323350 with self .assertRaises (AttributeError ):
33333351 a .__weakref__
33343352
3353+ # TODO: RUSTPYTHON
3354+ @unittest .expectedFailure
33353355 def test_slots_weakref (self ):
33363356 @dataclass (slots = True , weakref_slot = True )
33373357 class A :
@@ -3392,6 +3412,8 @@ def test_weakref_slot_make_dataclass(self):
33923412 "weakref_slot is True but slots is False" ):
33933413 B = make_dataclass ('B' , [('a' , int ),], weakref_slot = True )
33943414
3415+ # TODO: RUSTPYTHON
3416+ @unittest .expectedFailure
33953417 def test_weakref_slot_subclass_weakref_slot (self ):
33963418 @dataclass (slots = True , weakref_slot = True )
33973419 class Base :
@@ -3410,6 +3432,8 @@ class A(Base):
34103432 a_ref = weakref .ref (a )
34113433 self .assertIs (a .__weakref__ , a_ref )
34123434
3435+ # TODO: RUSTPYTHON
3436+ @unittest .expectedFailure
34133437 def test_weakref_slot_subclass_no_weakref_slot (self ):
34143438 @dataclass (slots = True , weakref_slot = True )
34153439 class Base :
@@ -3427,6 +3451,8 @@ class A(Base):
34273451 a_ref = weakref .ref (a )
34283452 self .assertIs (a .__weakref__ , a_ref )
34293453
3454+ # TODO: RUSTPYTHON
3455+ @unittest .expectedFailure
34303456 def test_weakref_slot_normal_base_weakref_slot (self ):
34313457 class Base :
34323458 __slots__ = ('__weakref__' ,)
@@ -3472,6 +3498,8 @@ class B[T2]:
34723498 self .assertTrue (B .__weakref__ )
34733499 B ()
34743500
3501+ # TODO: RUSTPYTHON
3502+ @unittest .expectedFailure
34753503 def test_dataclass_derived_generic_from_base (self ):
34763504 T = typing .TypeVar ('T' )
34773505
@@ -4513,6 +4541,8 @@ class C:
45134541 b : int = field (kw_only = True )
45144542 self .assertEqual (C (42 , b = 10 ).__match_args__ , ('a' ,))
45154543
4544+ # TODO: RUSTPYTHON
4545+ @unittest .expectedFailure
45164546 def test_KW_ONLY (self ):
45174547 @dataclass
45184548 class A :
0 commit comments