pixcdust.tests.init_tests

Attributes

TEST_DATA_COUNT

parser

Classes

JsonTestsSettings

Reader-writer for the test configuration.

Functions

init_hydroweb_env(→ None)

Configure the Hydroweb.next API key of the current environment.

download_test_data(→ None)

Download the test data from hydroweb.next.

check_test_data(→ bool)

Module Contents

class pixcdust.tests.init_tests.JsonTestsSettings[source]

Reader-writer for the test configuration.

CONFIG_FILE_NAME = 'conftest.json'[source]
property input_folder: pathlib.Path[source]

Path to folder where test input data are downloaded and stored.

property tmp_folder: pathlib.Path[source]

Path to folder where test outputs data are written.

property hydroweb_auth: str[source]

Hydroweb.next personal API key.

write() None[source]

Write the config in JSON to self._config_path.

property _config_path: pathlib.Path[source]

Path of the JSON config file.

Should be the absolute path of tests/conftest.json

pixcdust.tests.init_tests.init_hydroweb_env(test_settings: JsonTestsSettings) None[source]

Configure the Hydroweb.next API key of the current environment.

Args:

test_settings: the key is read from test_settings.hydroweb_auth.

pixcdust.tests.init_tests.download_test_data(path_download: pathlib.Path) None[source]

Download the test data from hydroweb.next.

Args:

path_download: where to store the test data.

pixcdust.tests.init_tests.TEST_DATA_COUNT = 2[source]
pixcdust.tests.init_tests.check_test_data(path_download: pathlib.Path) bool[source]
pixcdust.tests.init_tests.parser[source]