Tests for the data_handling Module¶
Tests for the data_handling submodule.
Tests for the data_handling.request Submodule¶
Tests for the data_handling.biomart Submodule¶
Tests for the data_handling.process Submodule¶
Tests for the scripts.data_handling.process submodule.
These unit tests are designed to test that the results of the query are handled correctly. They assume the data returned by the API query is formatted correctly, as tests of data returned by realworld API queries are best left to integrations tests. As such, representative data is included in the tests.data module.
- tests.data_handling.test_process.MANE¶
A minimal MANE dataset
- Type
pd.DataFrame
- tests.data_handling.test_process.test_results_columns(tmp_path: pathlib.Path) → None¶
Its columns are named correctly .
- tests.data_handling.test_process.test_sorted_results(tmp_path: pathlib.Path) → None¶
The results are sorted by median.
As the
merge_datafunction technically sorts on “MANE_status” as well, it would be ideal to test that sort, too. However, it it impossible to know in advance how many will have this status, so we cannot check count. Additionally, we cannot check the sort as most values are NaN, and knowing the correct order would require prior knowledge about the number of GTEx transcripts and the number with MANE status.- Parameters
tmp_path (Path) – pytest fixture for temporary path
- tests.data_handling.test_process.test_writes_file(tmp_path: pathlib.Path) → None¶
It writes a file.