File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
pandas/tests/series/indexing Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -367,14 +367,17 @@ def test_2d_to_1d_assignment_raises():
367367 x = np .random .randn (2 , 2 )
368368 y = pd .Series (range (2 ))
369369
370- msg = (
371- r"shape mismatch: value array of shape \(2,2\) could not be "
372- r"broadcast to indexing result of shape \(2,\)"
370+ msg = "|" .join (
371+ [
372+ r"shape mismatch: value array of shape \(2,2\) could not be "
373+ r"broadcast to indexing result of shape \(2,\)" ,
374+ r"cannot reshape array of size 4 into shape \(2,\)" ,
375+ ]
373376 )
374377 with pytest .raises (ValueError , match = msg ):
375378 y .loc [range (2 )] = x
376379
377- msg = r"could not broadcast input array from shape \(2,2\) into shape \(2\)"
380+ msg = r"could not broadcast input array from shape \(2,2\) into shape \(2,? \)"
378381 with pytest .raises (ValueError , match = msg ):
379382 y .loc [:] = x
380383
You can’t perform that action at this time.
0 commit comments