From bb1c4374cd96df5a62e7b1304b16ae936f4295ae Mon Sep 17 00:00:00 2001 From: Evgueni Ovtchinnikov Date: Thu, 9 Dec 2021 17:14:52 +0000 Subject: [PATCH] replaced the template for PET algebra testing with a smaller one, fixes #1013 --- src/xSTIR/pSTIR/tests/test_algebra.py | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/xSTIR/pSTIR/tests/test_algebra.py b/src/xSTIR/pSTIR/tests/test_algebra.py index 8b9899774..3f968b25d 100644 --- a/src/xSTIR/pSTIR/tests/test_algebra.py +++ b/src/xSTIR/pSTIR/tests/test_algebra.py @@ -41,13 +41,10 @@ def tearDown(self): class TestSTIRAcquisitionDataAlgebraFile(unittest.TestCase, TestDataContainerAlgebra): def setUp(self): - if os.path.exists(os.path.join( - examples_data_path('PET'), 'mMR', 'mMR_template_span11_small.hs')): - - template = pet.AcquisitionData(os.path.join( - examples_data_path('PET'), 'mMR', 'mMR_template_span11_small.hs') - ) - + path = os.path.join( + examples_data_path('PET'), 'thorax_single_slice', 'template_sinogram.hs') + if os.path.exists(path): + template = pet.AcquisitionData(path) self.image1 = template.get_uniform_copy(0) self.image2 = template.get_uniform_copy(0) # assert False @@ -68,17 +65,14 @@ def test_division_by_datacontainer_zero(self): class TestSTIRAcquisitionDataAlgebraMemory(unittest.TestCase, TestDataContainerAlgebra): def setUp(self): pet.AcquisitionData.set_storage_scheme('file') - if os.path.exists(os.path.join( - examples_data_path('PET'), 'mMR', 'mMR_template_span11_small.hs')): - - template = pet.AcquisitionData(os.path.join( - examples_data_path('PET'), 'mMR', 'mMR_template_span11_small.hs') - ) - + path = os.path.join( + examples_data_path('PET'), 'thorax_single_slice', 'template_sinogram.hs') + if os.path.exists(path): + template = pet.AcquisitionData(path) self.image1 = template.get_uniform_copy(0) self.image2 = template.get_uniform_copy(0) # assert False pet.AcquisitionData.set_storage_scheme('memory') def test_division_by_datacontainer_zero(self): # skip this test as currently cSIRF doesn't throw - pass \ No newline at end of file + pass