File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 21
21
22
22
23
23
class SharedWithSparse (object ):
24
+ """
25
+ A collection of tests Series and SparseSeries can share.
24
26
27
+ In generic tests on this class, use ``self._assert_series_equal()``
28
+ which is implemented in sub-classes.
29
+ """
25
30
def _assert_series_equal (self , left , right ):
26
31
"""Dispatch to series class dependent assertion"""
27
32
raise NotImplementedError
@@ -194,6 +199,7 @@ def test_constructor_dict_timedelta_index(self):
194
199
class TestSeriesMisc (TestData , SharedWithSparse ):
195
200
196
201
series_klass = Series
202
+ # SharedWithSparse tests use generic, series_klass-agnostic assertion
197
203
_assert_series_equal = staticmethod (tm .assert_series_equal )
198
204
199
205
def test_tab_completion (self ):
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ def _test_data2_zero():
61
61
class TestSparseSeries (SharedWithSparse ):
62
62
63
63
series_klass = SparseSeries
64
+ # SharedWithSparse tests use generic, series_klass-agnostic assertion
64
65
_assert_series_equal = staticmethod (tm .assert_sp_series_equal )
65
66
66
67
def setup_method (self , method ):
You can’t perform that action at this time.
0 commit comments