diff --git a/src/common/Utilities.py b/src/common/Utilities.py index f2ec51eca..7ab2d7a57 100644 --- a/src/common/Utilities.py +++ b/src/common/Utilities.py @@ -588,7 +588,7 @@ def is_operator_adjoint(operator, num_tests=5, max_err=10e-5, verbose=True): return True -def test_data_container_algebra(test, x, eps=1e-5): +def data_container_algebra_tests(test, x, eps=1e-5): ax = x.as_array() ay = numpy.ones_like(ax) diff --git a/src/xSTIR/pSTIR/tests/CMakeLists.txt b/src/xSTIR/pSTIR/tests/CMakeLists.txt index 84a45634a..520f860f7 100644 --- a/src/xSTIR/pSTIR/tests/CMakeLists.txt +++ b/src/xSTIR/pSTIR/tests/CMakeLists.txt @@ -19,7 +19,7 @@ #========================================================================= add_test(NAME PET_TESTS_PYTHON - COMMAND ${Python_EXECUTABLE} -m pytest --cov=sirf.STIR --cov-config=.coveragerc-STIR src/xSTIR/pSTIR + COMMAND ${Python_EXECUTABLE} -m pytest --cov=sirf.STIR --cov-config=.coveragerc-STIR src/xSTIR/pSTIR/tests WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) #add_test(NAME PET_DEMOS_PYTHON # COMMAND ${PYTHON_EXECUTABLE} run_all.py --non-interactive diff --git a/src/xSTIR/pSTIR/tests/tests_data_container_algebra.py b/src/xSTIR/pSTIR/tests/tests_data_container_algebra.py index 7af6c773a..f3e2e8ced 100644 --- a/src/xSTIR/pSTIR/tests/tests_data_container_algebra.py +++ b/src/xSTIR/pSTIR/tests/tests_data_container_algebra.py @@ -15,7 +15,7 @@ """ from sirf.STIR import * from sirf.Utilities import runner, RE_PYEXT, __license__ -from sirf.Utilities import test_data_container_algebra +from sirf.Utilities import data_container_algebra_tests __version__ = "0.2.3" __author__ = "Evgueni Ovtchinnikov" @@ -33,14 +33,14 @@ def test_main(rec=False, verb=False, throw=True): AcquisitionData.set_storage_scheme(scheme) raw_data_file = existing_filepath(data_path, 'Utahscat600k_ca_seg4.hs') ad = AcquisitionData(raw_data_file) - test_data_container_algebra(test, ad) + data_container_algebra_tests(test, ad) image_size = (31, 111, 111) voxel_size = (3.375, 3, 3) image = ImageData() image.initialise(image_size, voxel_size) image.fill(1.0) - test_data_container_algebra(test, image) + data_container_algebra_tests(test, image) return test.failed, test.ntest diff --git a/src/xSTIR/pSTIR/tests/tests_qp_lc_rdp.py b/src/xSTIR/pSTIR/tests/tests_qp_lc_rdp.py index e50f0c393..c54eab676 100644 --- a/src/xSTIR/pSTIR/tests/tests_qp_lc_rdp.py +++ b/src/xSTIR/pSTIR/tests/tests_qp_lc_rdp.py @@ -20,7 +20,7 @@ __author__ = "Imraj Singh, Evgueni Ovtchinnikov, Kris Thielemans" -def test_Hessian(test, prior, x, eps=1e-3): +def Hessian_test(test, prior, x, eps=1e-3): """Checks that grad(x + dx) - grad(x) is close to H(x)*dx """ if x.norm() > 0: @@ -84,7 +84,7 @@ def test_main(rec=False, verb=False, throw=True): if isinstance(prior, sirf.STIR.RelativeDifferencePrior): prior.set_epsilon(im.max()*.01) - test_Hessian(test, prior, im, 0.03) + Hessian_test(test, prior, im, 0.03) return test.failed, test.ntest