Loading tests/unit/backend/test_cli.py +3 −3 Original line number Diff line number Diff line from imars3d.backend.__main__ import main as main_backend from reduce_CG1D import main as main_CG1D from reduce_CG1D import ERROR_GENERAL import pytest from json.decoder import JSONDecodeError TIFF_DIR = "tests/data/imars3d-data/HFIR/CG1D/IPTS-25777/raw/ct_scans/iron_man" TIFF_RANDOM = TIFF_DIR + "/20191030_ironman_small_0070_233_740_0405.tiff" def test_bad(JSON_DIR): Loading @@ -21,11 +21,11 @@ def test_good(JSON_DIR): @pytest.mark.datarepo def test_outputdir_not_writable(): assert main_CG1D(TIFF_DIR, "this/dir/doesnt/exist") == ERROR_GENERAL assert main_CG1D(TIFF_RANDOM, "this/dir/doesnt/exist") == 1 def test_input_dir_doesnt_exist(): assert main_CG1D("this/dir/doesnt/exist", "/tmp/") == ERROR_GENERAL assert main_CG1D("this/dir/doesnt/exist", "/tmp/") == 1 if __name__ == "__main__": Loading Loading
tests/unit/backend/test_cli.py +3 −3 Original line number Diff line number Diff line from imars3d.backend.__main__ import main as main_backend from reduce_CG1D import main as main_CG1D from reduce_CG1D import ERROR_GENERAL import pytest from json.decoder import JSONDecodeError TIFF_DIR = "tests/data/imars3d-data/HFIR/CG1D/IPTS-25777/raw/ct_scans/iron_man" TIFF_RANDOM = TIFF_DIR + "/20191030_ironman_small_0070_233_740_0405.tiff" def test_bad(JSON_DIR): Loading @@ -21,11 +21,11 @@ def test_good(JSON_DIR): @pytest.mark.datarepo def test_outputdir_not_writable(): assert main_CG1D(TIFF_DIR, "this/dir/doesnt/exist") == ERROR_GENERAL assert main_CG1D(TIFF_RANDOM, "this/dir/doesnt/exist") == 1 def test_input_dir_doesnt_exist(): assert main_CG1D("this/dir/doesnt/exist", "/tmp/") == ERROR_GENERAL assert main_CG1D("this/dir/doesnt/exist", "/tmp/") == 1 if __name__ == "__main__": Loading