Close files in animation to silence some warning in the test suite on python3