autowisp.tests.get_test_data module

Class Inheritance Diagram

Inheritance diagram of TemporaryDirectory, ZipFile

Utility to download and uncompress the test data from Zenodo.

autowisp.tests.get_test_data.download_zip(destination)[source]

Download the test data zip file from Zenodo.

To reuse a local bundle instead (to skip re-fetching the large archive, or to test against a regenerated bundle), pass it explicitly with the --test-data command-line argument – a file in the current directory is deliberately not picked up implicitly, as that silently overrode Zenodo and produced confusing passes against a stale bundle.

autowisp.tests.get_test_data.get_test_data(destination, local_source=None)[source]

Populate destination with the test data.

If local_source is given, it must point to either a zip file (extracted into destination) or a directory whose contents are copied into destination. Otherwise, the test data zip is downloaded from Zenodo and extracted.