Skip to content

Make test_save_animation_smoketest actually run #2679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 20, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added try-catch block to test_animation to deal with strange
import errors coming out of numpy.  See issue #1891.
  • Loading branch information
tacaswell committed Dec 19, 2013
commit 61bce5ddc20cdef650a6cf2c5ff05898a665ea04
9 changes: 6 additions & 3 deletions lib/matplotlib/tests/test_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@

import six

import os
import tempfile

import numpy as np
from nose import with_setup
from matplotlib import pyplot as plt
from matplotlib import animation
from matplotlib.testing.noseclasses import KnownFailureTest
from matplotlib.testing.decorators import cleanup
from matplotlib.testing.decorators import CleanupTest


Expand Down Expand Up @@ -52,7 +50,12 @@ def animate(i):
# Use NamedTemporaryFile: will be automatically deleted
F = tempfile.NamedTemporaryFile(suffix='.' + extension)
anim = animation.FuncAnimation(fig, animate, init_func=init, frames=5)
anim.save(F.name, fps=30, writer=writer)
try:
anim.save(F.name, fps=30, writer=writer)
except UnicodeDecodeError:
raise KnownFailureTest("There can be errors in the numpy " +
"import stack, " +
"see issues #1891 and #2679")


if __name__ == "__main__":
Expand Down