File tree 1 file changed +7
-4
lines changed
pandas/tests/series/indexing
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():
367
367
x = np .random .randn (2 , 2 )
368
368
y = pd .Series (range (2 ))
369
369
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
+ ]
373
376
)
374
377
with pytest .raises (ValueError , match = msg ):
375
378
y .loc [range (2 )] = x
376
379
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,? \)"
378
381
with pytest .raises (ValueError , match = msg ):
379
382
y .loc [:] = x
380
383
You can’t perform that action at this time.
0 commit comments