コード例 #1
0
def test_sct_dice_coefficient_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function',
                            'sct_dice_coefficient')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''
コード例 #2
0
def test_sct_dmri_separate_b0_and_dwi_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function',
                            'sct_dmri_separate_b0_and_dwi')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''
コード例 #3
0
def test_sct_dmri_transpose_bvecs_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function',
                            'sct_dmri_transpose_bvecs')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''
コード例 #4
0
def test_sct_straighten_spinalcord_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function',
                            'sct_straighten_spinalcord')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''
コード例 #5
0
def test_sct_register_multimodal_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function',
                            'sct_register_multimodal')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''
コード例 #6
0
def test_sct_compute_ernst_angle_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function',
                            'sct_compute_ernst_angle')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''
コード例 #7
0
def test_entry_point_example_chinese_postman_sleeping_giant(script_runner):
    """
    Just testing that Sleeping Giant example run with pre-parameterized config.
    Will overwrite output in the examples dir... that's OK.
    """
    ret = script_runner.run('chinese_postman_sleeping_giant')
    assert ret.success
    assert os.path.isfile(OUT_SLEEPING_GIANT_SVG)
コード例 #8
0
def test_entry_point_example_rural_postman_problem_star(script_runner):
    """
    Just testing that star example runs with pre-parameterized config.
    Will overwrite output in the examples dir... that's OK.
    """
    ret = script_runner.run('rural_postman_star')
    assert ret.success
    assert os.path.isfile(OUT_STAR_SVG)
コード例 #9
0
def test_entry_point_example_chinese_postman_seven_bridges(script_runner):
    """
    Just testing that seven_bridges example runs with pre-parameterized config.
    Will overwrite output in the examples dir... that's OK.
    """
    ret = script_runner.run('chinese_postman_seven_bridges')
    assert ret.success
    assert os.path.isfile(OUT_SEVEN_BRIDGES_SVG)
    assert os.path.isfile(OUT_SEVEN_BRIDGES_GIF)
コード例 #10
0
def test_automate_training(download_functional_test_files, script_runner):
    file_config = Path(__data_testing_dir__, 'automate_training_config.json')
    file_config_hyper = Path(__data_testing_dir__,
                             'automate_training_hyperparameter_opt.json')
    __output_dir__ = Path(__tmp_dir__, 'results')

    ret = script_runner.run('ivadomed_automate_training', '--config',
                            f'{file_config}', '--config-hyper',
                            f'{file_config_hyper}', '--path-data',
                            f'{__data_testing_dir__}', '--output_dir',
                            f'{__output_dir__}')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert Path(__output_dir__, 'detailed_results.csv').exists()
    assert Path(__output_dir__, 'temporary_results.csv').exists()
    assert Path(__output_dir__, 'average_eval.csv').exists()

    # check sha256 is recorded in config_file.json
    check_sha256(str(file_config))
コード例 #11
0
def test_sct_label_vertebrae_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function', 'sct_label_vertebrae')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''
コード例 #12
0
def test_sct_deepseg_lesion_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function', 'sct_deepseg_lesion')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''
コード例 #13
0
def test_sct_extract_metric_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function', 'sct_extract_metric')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''
コード例 #14
0
def test_sct_convert_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function', 'sct_concat_transfo')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''
コード例 #15
0
def test_sct_flatten_sagittal_backwards_compat(script_runner):
    ret = script_runner.run('sct_testing', '--function', 'sct_flatten_sagittal')
    logger.debug(f"{ret.stdout}")
    logger.debug(f"{ret.stderr}")
    assert ret.success
    assert ret.stderr == ''