Skip to content

Commit

Permalink
reduce image tests on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
lldelisle committed May 8, 2024
1 parent 003bd58 commit 345354b
Show file tree
Hide file tree
Showing 2 changed files with 11 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 @@ -4,6 +4,7 @@
from tempfile import NamedTemporaryFile
import os.path
import matplotlib as mpl
import platform
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 = ['', '_corner', '_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
6 changes: 5 additions & 1 deletion baredSC/tests/test_combine_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,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 = ['', '_corner', '_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 345354b

Please sign in to comment.