From 726fe045f5a69ddcf3bca4533a1b73743919389c Mon Sep 17 00:00:00 2001 From: Kemal Yaylali Date: Tue, 29 Sep 2026 07:07:03 +0100 Subject: [PATCH] test: packaged CN data files --- tests/unit/test_cn.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/unit/test_cn.py b/tests/unit/test_cn.py index ab2c172..bc1fb00 100644 --- a/tests/unit/test_cn.py +++ b/tests/unit/test_cn.py @@ -219,3 +219,12 @@ def test_cn_annotate_end_to_end(tmp_path: Path) -> None: # CYTO-032 / CYTO-033 assert {c["id"] for c in doc["chromosomes"]} == {"1", "2"} normal = json.loads((out / "200000000001_R02C01.cyto.json").read_text()) assert normal["iscn_microarray"] in ("arr[GRCh38](1-22,X)x2", "arr[GRCh37](1-22,X)x2") or normal["events"] + + +def test_packaged_cn_data() -> None: # the built-in mask and cytobands ship with the package (CYTO-017, CYTO-035) + from simurg.pipeline.cn import _builtin_file, read_mask + + for build in ("GRCh37", "GRCh38"): + m = read_mask(None, build) + assert len(m) >= 24 and all(s <= e for iv in m.values() for s, e in iv) + assert gzip.decompress(_builtin_file(f"cytoBand_{build}.txt.gz")).startswith(b"chr1\t0\t")