File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -136,10 +136,8 @@ def test_grouper_repr(self):
136
136
assert result == "Grouper(key='A')"
137
137
138
138
result = repr (pd .Grouper (key = 'key' , freq = '50Min' , label = 'right' ))
139
- cls_name_result , attrib_result = result .split ('(' )
140
- attrib_result = set (attrib_result .rstrip (')' ).split (', ' ))
141
- assert cls_name_result == 'TimeGrouper'
142
- assert attrib_result == {"key='key'" , "freq='50T'" , "label='right'" }
139
+ expected = "TimeGrouper(key='key', freq='50T', label='right')"
140
+ assert result == expected
143
141
144
142
def test_grouper_multilevel_freq (self ):
145
143
Original file line number Diff line number Diff line change @@ -3160,10 +3160,8 @@ def setup_method(self, method):
3160
3160
def test_timegrouper_repr (self ):
3161
3161
# Added in GH17727
3162
3162
result = repr (TimeGrouper (key = 'key' , freq = '50Min' , label = 'right' ))
3163
- cls_name_result , attrib_result = result .split ('(' )
3164
- attrib_result = set (attrib_result .rstrip (')' ).split (', ' ))
3165
- assert cls_name_result == 'TimeGrouper'
3166
- assert attrib_result == {"key='key'" , "freq='50T'" , "label='right'" }
3163
+ expected = "TimeGrouper(key='key', freq='50T', label='right')"
3164
+ assert result == expected
3167
3165
3168
3166
def test_apply (self ):
3169
3167
with tm .assert_produces_warning (FutureWarning ,
You can’t perform that action at this time.
0 commit comments