@@ -564,11 +564,10 @@ def setup_method(self, method):
564
564
self .offset2 = BDay (2 )
565
565
566
566
def test_different_normalize_equals (self ):
567
- # equivalent in this special case
568
- offset = BDay ()
569
- offset2 = BDay ()
570
- offset2 .normalize = True
571
- assert offset == offset2
567
+ # GH#21404 changed __eq__ to return False when `normalize` doesnt match
568
+ offset = self ._offset ()
569
+ offset2 = self ._offset (normalize = True )
570
+ assert offset != offset2
572
571
573
572
def test_repr (self ):
574
573
assert repr (self .offset ) == '<BusinessDay>'
@@ -734,11 +733,10 @@ def test_constructor_errors(self):
734
733
BusinessHour (start = '14:00:05' )
735
734
736
735
def test_different_normalize_equals (self ):
737
- # equivalent in this special case
736
+ # GH#21404 changed __eq__ to return False when `normalize` doesnt match
738
737
offset = self ._offset ()
739
- offset2 = self ._offset ()
740
- offset2 .normalize = True
741
- assert offset == offset2
738
+ offset2 = self ._offset (normalize = True )
739
+ assert offset != offset2
742
740
743
741
def test_repr (self ):
744
742
assert repr (self .offset1 ) == '<BusinessHour: BH=09:00-17:00>'
@@ -1397,11 +1395,10 @@ def test_constructor_errors(self):
1397
1395
CustomBusinessHour (start = '14:00:05' )
1398
1396
1399
1397
def test_different_normalize_equals (self ):
1400
- # equivalent in this special case
1398
+ # GH#21404 changed __eq__ to return False when `normalize` doesnt match
1401
1399
offset = self ._offset ()
1402
- offset2 = self ._offset ()
1403
- offset2 .normalize = True
1404
- assert offset == offset2
1400
+ offset2 = self ._offset (normalize = True )
1401
+ assert offset != offset2
1405
1402
1406
1403
def test_repr (self ):
1407
1404
assert repr (self .offset1 ) == '<CustomBusinessHour: CBH=09:00-17:00>'
@@ -1627,11 +1624,10 @@ def setup_method(self, method):
1627
1624
self .offset2 = CDay (2 )
1628
1625
1629
1626
def test_different_normalize_equals (self ):
1630
- # equivalent in this special case
1631
- offset = CDay ()
1632
- offset2 = CDay ()
1633
- offset2 .normalize = True
1634
- assert offset == offset2
1627
+ # GH#21404 changed __eq__ to return False when `normalize` doesnt match
1628
+ offset = self ._offset ()
1629
+ offset2 = self ._offset (normalize = True )
1630
+ assert offset != offset2
1635
1631
1636
1632
def test_repr (self ):
1637
1633
assert repr (self .offset ) == '<CustomBusinessDay>'
@@ -1865,11 +1861,10 @@ class TestCustomBusinessMonthEnd(CustomBusinessMonthBase, Base):
1865
1861
_offset = CBMonthEnd
1866
1862
1867
1863
def test_different_normalize_equals (self ):
1868
- # equivalent in this special case
1869
- offset = CBMonthEnd ()
1870
- offset2 = CBMonthEnd ()
1871
- offset2 .normalize = True
1872
- assert offset == offset2
1864
+ # GH#21404 changed __eq__ to return False when `normalize` doesnt match
1865
+ offset = self ._offset ()
1866
+ offset2 = self ._offset (normalize = True )
1867
+ assert offset != offset2
1873
1868
1874
1869
def test_repr (self ):
1875
1870
assert repr (self .offset ) == '<CustomBusinessMonthEnd>'
@@ -1982,11 +1977,10 @@ class TestCustomBusinessMonthBegin(CustomBusinessMonthBase, Base):
1982
1977
_offset = CBMonthBegin
1983
1978
1984
1979
def test_different_normalize_equals (self ):
1985
- # equivalent in this special case
1986
- offset = CBMonthBegin ()
1987
- offset2 = CBMonthBegin ()
1988
- offset2 .normalize = True
1989
- assert offset == offset2
1980
+ # GH#21404 changed __eq__ to return False when `normalize` doesnt match
1981
+ offset = self ._offset ()
1982
+ offset2 = self ._offset (normalize = True )
1983
+ assert offset != offset2
1990
1984
1991
1985
def test_repr (self ):
1992
1986
assert repr (self .offset ) == '<CustomBusinessMonthBegin>'
0 commit comments