IntegrityTestCase
- class IntegrityTestCase(methodName='runTest')[source]
Bases:
TestCase
Data integrity tests.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
Methods Summary
assert_canonical_identifier
(prefix, ...)Assert a given identifier is canonical.
assert_no_internal_redundancies
(m, tuple_cls)Assert that the list of mappings doesn't have any redundancies.
Test that all mappings use canonical bioregistry prefixes.
Test all contributors have an entry in the curators.tsv file.
Test the redundancy of manually curated mappings and predicted mappings.
Test the true curated mappings are in a canonical order.
Test the false curated mappings are in a canonical order.
Test that all identifiers have been normalized (based on bioregistry definition).
Test that the prediction type is pulled in properly.
Test the predictions are in a canonical order.
Test that the relation is a CURIE.
Test the unsure mappings are in a canonical order.
Methods Documentation
- assert_canonical_identifier(prefix: str, identifier: str, label: str, line: int) None [source]
Assert a given identifier is canonical.
- Parameters:
prefix – The prefix to check
identifier – The identifier in the semantic space for the prefix
label – The label of the mapping file
line – The line number of the mapping
- assert_no_internal_redundancies(m: Iterable[Mapping[str, str]], tuple_cls)[source]
Assert that the list of mappings doesn’t have any redundancies.
- test_cross_redundancy()[source]
Test the redundancy of manually curated mappings and predicted mappings.