Skip to content

Commit

Permalink
decrease number of images to test on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
lldelisle committed May 8, 2024
1 parent acd3f0f commit 6a641a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion baredSC/tests/test_baredSC_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
from tempfile import NamedTemporaryFile
import os.path
import platform
import matplotlib as mpl
from matplotlib.testing.compare import compare_images
import baredSC.baredSC_2d
Expand Down Expand Up @@ -45,7 +46,11 @@ def test_baredSC_2d_1gauss_small():
f"--figure {outfig.name} " \
f"--logevidence {outfile_evid.name}".split()
baredSC.baredSC_2d.main(args)
for suffix in BARED_2D_IMAGES_SUFFIX:
if platform.system() == "Linux":
suffix_to_test = BARED_2D_IMAGES_SUFFIX
else:
suffix_to_test = ['', '_median']
for suffix in suffix_to_test:
expected_file = f'{expected}{suffix}.{extension}'
obtained_file = f'{outfig_base}{suffix}.{extension}'
res = compare_images(expected_file,
Expand Down
7 changes: 6 additions & 1 deletion baredSC/tests/test_combine_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
from tempfile import NamedTemporaryFile
import os.path
import platform
import matplotlib as mpl
from matplotlib.testing.compare import compare_images
import baredSC.combineMultipleModels_2d
Expand Down Expand Up @@ -40,7 +41,11 @@ def test_combine_2d_test1():
f"--outputs {ROOT}/2d_small_1gauss {ROOT}/2d_small_2gauss " \
f"--figure {outfig.name}".split()
baredSC.combineMultipleModels_2d.main(args)
for suffix in BARED_2D_IMAGES_SUFFIX:
if platform.system() == "Linux":
suffix_to_test = BARED_2D_IMAGES_SUFFIX
else:
suffix_to_test = ['', '_median']
for suffix in suffix_to_test:
expected_file = f'{expected}{suffix}.{extension}'
obtained_file = f'{outfig_base}{suffix}.{extension}'
res = compare_images(expected_file,
Expand Down

0 comments on commit 6a641a1

Please sign in to comment.