@@ -137,22 +137,19 @@ def test_constructor_no_data_index_order(self):
137
137
def test_constructor_no_data_string_type (self ):
138
138
# GH 22477
139
139
result = pd .Series (index = [1 ], dtype = str )
140
- assert result . isna (). all ( )
140
+ assert np . isnan ( result . iloc [ 0 ] )
141
141
142
- def test_constructor_single_element_string_type (self ):
142
+ @pytest .mark .parametrize ('item' , ['13' ])
143
+ def test_constructor_single_element_string_type (self , item ):
143
144
# GH 22477
144
- result = pd .Series (13 , index = [1 ], dtype = str )
145
- assert result .values . tolist () == [ '13' ]
145
+ result = pd .Series (int ( item ) , index = [1 ], dtype = str )
146
+ assert result .iloc [ 0 ] == item
146
147
147
- def test_constructor_string_element_string_type (self ):
148
+ @pytest .mark .parametrize ('item' , ['entry' , 'ѐ' ])
149
+ def test_constructor_string_element_string_type (self , item ):
148
150
# GH 22477
149
- result = pd .Series ('entry' , index = [1 ], dtype = str )
150
- assert result .values .tolist () == ['entry' ]
151
-
152
- def test_constructor_unicode_element_string_type (self ):
153
- # GH 22477
154
- result = pd .Series ('ѐ' , index = [1 ], dtype = str )
155
- assert result .values .tolist () == ['ѐ' ]
151
+ result = pd .Series (item , index = [1 ], dtype = str )
152
+ assert result .iloc [0 ] == item
156
153
157
154
def test_constructor_dtype_str_na_values (self , string_dtype ):
158
155
# https://github.com/pandas-dev/pandas/issues/21083
0 commit comments