BF(TST): allow AttributeError being raised (in addition to TypeError) from mpl origin...
authorYaroslav Halchenko <debian@onerussian.com>
Wed, 13 Jul 2016 14:42:00 +0000 (14:42 +0000)
committerYaroslav Halchenko <debian@onerussian.com>
Wed, 13 Jul 2016 14:42:00 +0000 (14:42 +0000)
Gbp-Pq: Name changeset_46af7cf0f8e0477f6cc7454aa786a573228f0ac3.diff

pandas/tests/test_graphics.py

index 604cd89dac6175f46afd26d967482c841b0e37c7..e3ffcb76a3429a616c433632c83440cc02dbf53e 100644 (file)
@@ -1318,7 +1318,8 @@ class TestDataFramePlots(TestPlotBase):
         self._check_axes_shape(axes, axes_num=4, layout=(4, 1))
 
         df = DataFrame({'x': [1, 2], 'y': [3, 4]})
-        with tm.assertRaises(TypeError):
+        # mpl >= 1.5.2 (or slightly below) throw AttributError
+        with tm.assertRaises((TypeError, AttributeError)):
             df.plot.line(blarg=True)
 
         df = DataFrame(np.random.rand(10, 3),