Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fd04f2d

Browse files
committed
TST: cbook reshape2d empty list
1 parent 3f6df2e commit fd04f2d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/tests/test_cbook.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,11 @@ def test_flatiter():
495495
def test_reshape2d():
496496
class dummy():
497497
pass
498+
xnew = cbook._reshape_2D([], 'x')
499+
assert np.shape(xnew) == (1, 0)
500+
498501
x = [dummy() for j in range(5)]
502+
499503
xnew = cbook._reshape_2D(x, 'x')
500504
assert np.shape(xnew) == (1, 5)
501505

0 commit comments

Comments
 (0)