Initial commit
This commit is contained in:
18
tests/test_resolver.py
Normal file
18
tests/test_resolver.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from pathlib import Path
|
||||
|
||||
from genomic_consultant.panels.resolver import PhenotypeGeneResolver
|
||||
|
||||
|
||||
def test_resolver_build_panel(tmp_path: Path):
|
||||
data = {
|
||||
"version": "test",
|
||||
"source": "example",
|
||||
"phenotype_to_genes": {"HP:0001": ["GENE1", "GENE2"]},
|
||||
}
|
||||
path = tmp_path / "map.json"
|
||||
path.write_text('{"version":"test","source":"example","phenotype_to_genes":{"HP:0001":["GENE1","GENE2"]}}')
|
||||
resolver = PhenotypeGeneResolver.from_json(path)
|
||||
panel = resolver.build_panel("HP:0001")
|
||||
assert panel is not None
|
||||
assert panel.genes == ["GENE1", "GENE2"]
|
||||
assert "phenotype_id" in panel.metadata
|
||||
Reference in New Issue
Block a user