16
16
import string
17
17
18
18
import numpy as np
19
- import pytest
20
19
21
20
import pandas as pd
22
21
from pandas import Categorical
23
22
from pandas .api .types import CategoricalDtype
24
23
from pandas .tests .extension import base
25
24
import pandas .util .testing as tm
25
+ import pytest
26
26
27
27
28
28
def make_data ():
@@ -73,80 +73,67 @@ class TestDtype(base.BaseDtypeTests):
73
73
74
74
75
75
class TestInterface (base .BaseInterfaceTests ):
76
- @pytest .mark .skip (reason = "Memory usage doesn't match" )
77
- def test_memory_usage (self ):
76
+ @pytest .mark .skip (reason = "Memory usage doesn't match" , strict = True )
77
+ def test_memory_usage (self , data ):
78
78
# Is this deliberate?
79
- pass
79
+ super ( TestInterface , self ). test_memory_usage ( data )
80
80
81
81
82
82
class TestConstructors (base .BaseConstructorsTests ):
83
83
pass
84
84
85
85
86
86
class TestReshaping (base .BaseReshapingTests ):
87
- @pytest .mark .skip (reason = "Unobserved categories preseved in concat." )
88
- def test_concat_columns (self , data , na_value ):
89
- pass
90
-
91
- @pytest .mark .skip (reason = "Unobserved categories preseved in concat." )
92
- def test_align (self , data , na_value ):
93
- pass
94
-
95
- @pytest .mark .skip (reason = "Unobserved categories preseved in concat." )
96
- def test_align_frame (self , data , na_value ):
97
- pass
98
-
99
- @pytest .mark .skip (reason = "Unobserved categories preseved in concat." )
100
- def test_merge (self , data , na_value ):
101
- pass
87
+ pass
102
88
103
89
104
90
class TestGetitem (base .BaseGetitemTests ):
105
- skip_take = pytest .mark .skip (reason = "GH-20664." )
91
+ skip_take = pytest .mark .skip (reason = "GH-20664." , strict = True )
106
92
107
- @pytest .mark .skip (reason = "Backwards compatibility" )
108
- def test_getitem_scalar (self ):
93
+ @pytest .mark .skip (reason = "Backwards compatibility" , strict = True )
94
+ def test_getitem_scalar (self , data ):
109
95
# CategoricalDtype.type isn't "correct" since it should
110
96
# be a parent of the elements (object). But don't want
111
97
# to break things by changing.
112
- pass
98
+ super ( TestGetitem , self ). test_getitem_scalar ( data )
113
99
114
100
@skip_take
115
- def test_take (self ):
101
+ def test_take (self , data , na_value , na_cmp ):
116
102
# TODO remove this once Categorical.take is fixed
117
- pass
103
+ super ( TestGetitem , self ). test_take ( data , na_value , na_cmp )
118
104
119
105
@skip_take
120
- def test_take_negative (self ):
121
- pass
106
+ def test_take_negative (self , data ):
107
+ super (). test_take_negative ( data )
122
108
123
109
@skip_take
124
- def test_take_pandas_style_negative_raises (self ):
125
- pass
110
+ def test_take_pandas_style_negative_raises (self , data , na_value ):
111
+ super (). test_take_pandas_style_negative_raises ( data , na_value )
126
112
127
113
@skip_take
128
- def test_take_non_na_fill_value (self ):
129
- pass
114
+ def test_take_non_na_fill_value (self , data_missing ):
115
+ super (). test_take_non_na_fill_value ( data_missing )
130
116
131
117
@skip_take
132
- def test_take_out_of_bounds_raises (self ):
133
- pass
118
+ def test_take_out_of_bounds_raises (self , data , allow_fill ):
119
+ return super (). test_take_out_of_bounds_raises ( data , allow_fill )
134
120
135
- @pytest .mark .skip (reason = "GH-20747. Unobserved categories." )
136
- def test_take_series (self ):
137
- pass
121
+ @pytest .mark .skip (reason = "GH-20747. Unobserved categories." , strict = True )
122
+ def test_take_series (self , data ):
123
+ super (). test_take_series ( data )
138
124
139
125
@skip_take
140
- def test_reindex_non_na_fill_value (self ):
141
- pass
126
+ def test_reindex_non_na_fill_value (self , data_missing ):
127
+ super (). test_reindex_non_na_fill_value ( data_missing )
142
128
143
- @pytest .mark .skip (reason = "Categorical.take buggy" )
144
- def test_take_empty (self ):
145
- pass
129
+ @pytest .mark .skip (reason = "Categorical.take buggy" , strict = True )
130
+ def test_take_empty (self , data , na_value , na_cmp ):
131
+ super (). test_take_empty ( data , na_value , na_cmp )
146
132
147
- @pytest .mark .skip (reason = "test not written correctly for categorical" )
148
- def test_reindex (self ):
149
- pass
133
+ @pytest .mark .skip (reason = "test not written correctly for categorical" ,
134
+ strict = True )
135
+ def test_reindex (self , data , na_value ):
136
+ super ().test_reindex (data , na_value )
150
137
151
138
152
139
class TestSetitem (base .BaseSetitemTests ):
@@ -155,25 +142,23 @@ class TestSetitem(base.BaseSetitemTests):
155
142
156
143
class TestMissing (base .BaseMissingTests ):
157
144
158
- @pytest .mark .skip (reason = "Not implemented" )
159
- def test_fillna_limit_pad (self ):
160
- pass
145
+ @pytest .mark .skip (reason = "Not implemented" , strict = True )
146
+ def test_fillna_limit_pad (self , data_missing ):
147
+ super (). test_fillna_limit_pad ( data_missing )
161
148
162
- @pytest .mark .skip (reason = "Not implemented" )
163
- def test_fillna_limit_backfill (self ):
164
- pass
149
+ @pytest .mark .skip (reason = "Not implemented" , strict = True )
150
+ def test_fillna_limit_backfill (self , data_missing ):
151
+ super (). test_fillna_limit_backfill ( data_missing )
165
152
166
153
167
154
class TestReduce (base .BaseNoReduceTests ):
168
155
pass
169
156
170
157
171
158
class TestMethods (base .BaseMethodsTests ):
172
- pass
173
-
174
- @pytest .mark .skip (reason = "Unobserved categories included" )
159
+ @pytest .mark .skip (reason = "Unobserved categories included" , strict = True )
175
160
def test_value_counts (self , all_data , dropna ):
176
- pass
161
+ return super (). test_value_counts ( all_data , dropna )
177
162
178
163
def test_combine_add (self , data_repeated ):
179
164
# GH 20825
@@ -191,9 +176,9 @@ def test_combine_add(self, data_repeated):
191
176
expected = pd .Series ([a + val for a in list (orig_data1 )])
192
177
self .assert_series_equal (result , expected )
193
178
194
- @pytest .mark .skip (reason = "Not Applicable" )
179
+ @pytest .mark .skip (reason = "Not Applicable" , strict = True )
195
180
def test_fillna_length_mismatch (self , data_missing ):
196
- pass
181
+ super (). test_fillna_length_mismatch ( data_missing )
197
182
198
183
199
184
class TestCasting (base .BaseCastingTests ):
0 commit comments