@@ -137,22 +137,19 @@ def test_constructor_no_data_index_order(self):
137137 def test_constructor_no_data_string_type (self ):
138138 # GH 22477
139139 result = pd .Series (index = [1 ], dtype = str )
140- assert result . isna (). all ( )
140+ assert np . isnan ( result . iloc [ 0 ] )
141141
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 ):
143144 # 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
146147
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 ):
148150 # 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
156153
157154 def test_constructor_dtype_str_na_values (self , string_dtype ):
158155 # https://github.com/pandas-dev/pandas/issues/21083
0 commit comments