Esempio n. 1
0
def download_data(request):
    # This is a hack because the capsys fixture can't be used with
    # session scope at the moment.
    # https://github.com/pytest-dev/pytest/issues/2704#issuecomment-603387680
    capmanager = request.config.pluginmanager.getplugin("capturemanager")
    with capmanager.global_and_fixture_disabled():
        print('\nDownloading sct testing data.')
        downloader.main(['-d', 'sct_testing_data', '-o', sct_test_path()])
Esempio n. 2
0
def downloaddata(param):
    """
    Download testing data from internet.
    Parameters
    ----------
    param

    Returns
    -------
    None
    """
    sct.printv('\nDownloading testing data...', param.verbose)
    import sct_download_data
    sct_download_data.main(['-d', 'sct_testing_data'])
Esempio n. 3
0
def downloaddata(param):
    """
    Download testing data from internet.
    Parameters
    ----------
    param

    Returns
    -------
    None
    """
    sct.printv('\nDownloading testing data...', param.verbose)
    import sct_download_data
    sct_download_data.main(['-d', 'sct_testing_data'])
Esempio n. 4
0
def downloaddata():
    sct.printv('\nDownloading testing data...', param.verbose)
    import sct_download_data
    sct_download_data.main(['-d', 'sct_testing_data'])
Esempio n. 5
0
def pytest_sessionstart():
    """ Download sct_testing_data prior to test collection. """
    logger.info("Downloading sct test data")
    downloader.main(['-d', 'sct_testing_data', '-o', sct_test_path()])
Esempio n. 6
0
def downloaddata():
    sct.printv('\nDownloading testing data...', param.verbose)
    import sct_download_data
    sct_download_data.main(['-d', 'sct_testing_data'])