Skip to content

Commit

Permalink
ENH: Changing test to use images on github repo
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamTheisen committed Dec 19, 2023
1 parent ec0642a commit c5d1763
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions act/tests/utils/test_io_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import random
import glob
import pytest
import os

import act
from act.tests import sample_files
Expand Down Expand Up @@ -215,8 +216,11 @@ def test_gunzip():

@pytest.mark.skipif(not MOVIEPY_AVAILABLE, reason='MoviePy is not installed.')
def test_generate_movie():
act_dir = act.__file__
baseline = '/'.join(act_dir.split('/')[0:-1] + ['tests', 'plotting', 'baseline'])
files = glob.glob(baseline + '/*contour*png')
result = act.utils.generate_movie(files)
files = [
'https://github.com/ARM-DOE/ACT/blob/main/act/tests/plotting/baseline/test_contour.png?raw=true',
'https://github.com/ARM-DOE/ACT/blob/main/act/tests/plotting/baseline/test_contour2.png?raw=true',
'https://github.com/ARM-DOE/ACT/blob/main/act/tests/plotting/baseline/test_contourf.png?raw=true',
'https://github.com/ARM-DOE/ACT/blob/main/act/tests/plotting/baseline/test_contourf2.png?raw=true'
]
result = act.utils.generate_movie(files, fps=5)
assert str(result) == 'movie.mp4'

0 comments on commit c5d1763

Please sign in to comment.