-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preprocessing unit tests #45
Comments
How to Run All Tests in a Given FolderTo run all unit tests in a specific folder using Python's Command Example:python -m unittest discover -s <test_folder> -t <top-level-directory> -p "<pattern>" Explanation of Parameters:
Running All Tests in
|
The test case for above class is not added/covered in this issue, due to issue #53. It will added after completion of the issue. |
We already have some tests for data preprocessing. However, those are more integration tests that capture the behaviour of the tool as a whole than unit tests for specific functions.
In order to efficiently test the different preprocessing functionalities, we need to add some smaller-scale unit tests. Those should not include real data, but sample input values that can be generated from scratch.
Here are the classes / functions that should be covered (from the implementation in the
protein_prediction
branchreader.py
:to_data()
_read_data()
_read_data()
_read_data()
_read_data()
collate.py
:__call__()
__call__()
,process_label_rows()
datasets/base.py
_filter_labels()
get_test_split()
,get_train_val_splits_given_test()
datasets/chebi.py
_extract_class_hierarchy()
,_graph_to_raw_dataset()
,_load_dict()
,_setup_pruned_test_set()
select_classes()
extract_class_hierarchy()
term_callback()
datasets/go_uniprot.py
:_extract_class_hierarchy()
,term_callback()
,_graph_to_raw_dataset()
,_get_swiss_to_go_mapping()
,_load_dict()
select_classes()
datasets/tox21.py
:Tox21MolNet:setup_processed()
,_load_data_from_file()
setup_processed()
,_load_data_from_file()
,_load_dict()
For some functions, it is necessary to read from / write to files. Instead of real files, I would suggest to use mock objects (see e.g. this comment)
The text was updated successfully, but these errors were encountered: