[PATCH] Fixes failing test due to AttributeError in matplotlib version 0.91.2 (Issue 1956)

1 view
Skip to first unread message

Øyvind Jensen

unread,
Jun 13, 2010, 5:17:14 AM6/13/10
to sympy-...@googlegroups.com, Øyvind Jensen
---
sympy/mpmath/tests/test_visualization.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/sympy/mpmath/tests/test_visualization.py b/sympy/mpmath/tests/test_visualization.py
index 7ecfb7e..43d258c 100644
--- a/sympy/mpmath/tests/test_visualization.py
+++ b/sympy/mpmath/tests/test_visualization.py
@@ -21,8 +21,12 @@ def test_axes():
axes = fig.add_subplot(111)
for ctx in [mp, fp]:
ctx.plot(lambda x: x**2, [0, 3], axes=axes)
- assert axes.get_xlabel() == 'x'
- assert axes.get_ylabel() == 'f(x)'
+ try:
+ assert axes.get_xlabel() == 'x'
+ assert axes.get_ylabel() == 'f(x)'
+ except AttributeError:
+ print "\nSkipping test (pylab problem)\n"
+ return

fig = pylab.figure()
axes = fig.add_subplot(111)
--
1.6.5

Ondrej Certik

unread,
Jun 14, 2010, 10:42:42 AM6/14/10
to sympy-...@googlegroups.com
+1

> --
> You received this message because you are subscribed to the Google Groups "sympy-patches" group.
> To post to this group, send email to sympy-...@googlegroups.com.
> To unsubscribe from this group, send email to sympy-patche...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages