File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Lib/test/test_dataclasses Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2606,8 +2606,8 @@ class Point:
26062606 p1 = Point (1 , 2 )
26072607 p2 = Point (1 , 2 )
26082608 p3 = Point (2 , 1 )
2609- self .assertTrue (p1 == p2 )
2610- self .assertFalse (p1 == p3 )
2609+ self .assertEqual (p1 , p2 )
2610+ self .assertNotEqual (p1 , p3 )
26112611
26122612 def test_eq_type_check (self ):
26132613 @dataclasses .dataclass
@@ -2620,7 +2620,7 @@ class B:
26202620
26212621 a = A (1 )
26222622 b = B (1 )
2623- self .assertFalse ( a == b )
2623+ self .assertNotEqual ( a , b )
26242624
26252625 def test_eq_custom_field (self ):
26262626 class AlwaysEqual (int ):
@@ -2634,7 +2634,7 @@ class Foo:
26342634
26352635 f1 = Foo (AlwaysEqual (1 ), 2 )
26362636 f2 = Foo (AlwaysEqual (2 ), 2 )
2637- self .assertTrue (f1 == f2 )
2637+ self .assertEqual (f1 , f2 )
26382638
26392639 def test_eq_nan_field (self ):
26402640 @dataclasses .dataclass
@@ -2644,7 +2644,7 @@ class D:
26442644 nan = float ('nan' )
26452645 d1 = D (nan )
26462646 d2 = D (nan )
2647- self .assertFalse (d1 == d2 )
2647+ self .assertNotEqual (d1 , d2 )
26482648
26492649
26502650class TestOrdering (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments