File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed 
pandas/tests/sparse/frame Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -156,15 +156,6 @@ def test_constructor_ndarray(self, float_frame):
156156 SparseDataFrame (float_frame .values ,
157157 columns = float_frame .columns [:- 1 ])
158158
159-  def  test_construct_unmatched_sparsedataframe (self , float_frame ):
160-  # GH25484 
161-  dates  =  pd .bdate_range ('1/1/2011' , periods = 10 )
162-  sp  =  SparseDataFrame (float_frame .values , index = dates )
163-  N  =  len (sp )
164-  msg  =  'Length of values does not match length of index' 
165-  with  pytest .raises (ValueError , match = msg ):
166-  sp ['foo' ] =  np .random .randn (N  -  1 )
167- 
168159 # GH 9272 
169160 def  test_constructor_empty (self ):
170161 sp  =  SparseDataFrame ()
@@ -560,8 +551,10 @@ def _check_frame(frame, orig):
560551 assert  len (frame ['I' ].sp_values ) ==  N  //  2 
561552
562553 # insert ndarray wrong size 
563-  pytest .raises (Exception , frame .__setitem__ , 'foo' ,
564-  np .random .randn (N  -  1 ))
554+  # GH 25484 
555+  msg  =  'Length of values does not match length of index' 
556+  with  pytest .raises (ValueError , match = msg ):
557+  frame ['foo' ] =  np .random .randn (N  -  1 )
565558
566559 # scalar value 
567560 frame ['J' ] =  5 
                         You can’t perform that action at this time. 
           
                  
0 commit comments