From 6a641a1b0b61e1d34404e292452b9f13993e3472 Mon Sep 17 00:00:00 2001 From: Lucille Delisle Date: Wed, 8 May 2024 11:34:10 +0200 Subject: [PATCH] decrease number of images to test on macos --- baredSC/tests/test_baredSC_2d.py | 7 ++++++- baredSC/tests/test_combine_2d.py | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/baredSC/tests/test_baredSC_2d.py b/baredSC/tests/test_baredSC_2d.py index 675b9c8..e2e3a7e 100644 --- a/baredSC/tests/test_baredSC_2d.py +++ b/baredSC/tests/test_baredSC_2d.py @@ -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 @@ -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, diff --git a/baredSC/tests/test_combine_2d.py b/baredSC/tests/test_combine_2d.py index 6a76f1c..57e4b8c 100644 --- a/baredSC/tests/test_combine_2d.py +++ b/baredSC/tests/test_combine_2d.py @@ -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 @@ -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,