Skip to content

Commit 07fff67

Browse files
committed
Added test for bug fix of issue pandas-dev#9671
1 parent fe39d3c commit 07fff67

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pandas/tests/test_graphics.py

+12
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,18 @@ def test_plot(self):
991991
df = DataFrame({'x': [1, 2], 'y': [3, 4]})
992992
with tm.assertRaises(TypeError):
993993
df.plot(kind='line', blarg=True)
994+
try:
995+
df.plot(color = ['red', 'black'], style = ['-', '--'])
996+
df['x'].plot(color = 'red', style = '-')
997+
except:
998+
self.fail("Calling 'plot()' on a dataframe/series and passing both 'color' and 'style' arguments should be allowed if there is no color symbol in the style string(s)")
999+
try:
1000+
df.plot(color = ['red', 'black'], style = ['k-', 'r--'])
1001+
df['x'].plot(color = 'red', style = 'k-')
1002+
except:
1003+
pass
1004+
else:
1005+
self.fail("Calling 'plot()' on a dataframe/series and passing both 'color' and 'style' arguments should raise an error if there is a color symbol in the style string(s)")
9941006

9951007
df = DataFrame(np.random.rand(10, 3),
9961008
index=list(string.ascii_letters[:10]))

0 commit comments

Comments
 (0)