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()])
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'])
def downloaddata(): sct.printv('\nDownloading testing data...', param.verbose) import sct_download_data sct_download_data.main(['-d', 'sct_testing_data'])
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()])