diff options
| author | Alexander_Kabui <alexanderkabua@gmail.com> | 2026-10-07 21:01:40 +0300 |
|---|---|---|
| committer | Alexander_Kabui <alexanderkabua@gmail.com> | 2026-10-07 21:01:40 +0300 |
| commit | 85b63abcfdbae235d292a6de4bd47ffe6ba6dafd (patch) | |
| tree | 8b39f26fad90eaa27751fd061ab1cbc91ae95b08 /test/python/test_group_trait_info.py | |
| parent | b68531c40d91cadfd868e4b65ff92989ffd4fb27 (diff) | |
| parent | e912c87deaf220fd5fce1299d669e8fa992b5338 (diff) | |
| download | genenetwork4-85b63abcfdbae235d292a6de4bd47ffe6ba6dafd.tar.gz | |
Merge origin/main (e912c87: /search gains lod, locus, sort/order) into
native-search-engine. Resolution: his route-level additions compose above the engine seam — the handler now validates sort/order, asks the engine for SORT_FETCH_LIMIT (1000) when ranking, maps SearchError via the seam's engine_error, then computes lod, sorts, truncates to limit and fills loci; lod/locus join SearchHit in src/search/mod.rs. His tests pass through the seam. KNOWN at this commit: the parity floor is BLOCKED (36 shapes) — the route's new truncate(limit) exposes that route-level full-set grading was a calibration-stub artifact (real gn3 caps at per_page; the stub ignored it). Harness fix queued: set-equality moves to engine level, status + top-10 stay route level. Landed together with that fix.
Diffstat (limited to 'test/python/test_group_trait_info.py')
| -rw-r--r-- | test/python/test_group_trait_info.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/python/test_group_trait_info.py b/test/python/test_group_trait_info.py index d5a0761..1e4fab8 100644 --- a/test/python/test_group_trait_info.py +++ b/test/python/test_group_trait_info.py @@ -36,6 +36,21 @@ class GroupTraitInfoTest(ServerTestCase): finally: conn.close() + def test_group_trait_info_reports_lod_and_locus(self): + # The "highest LOD ... serotonin in BXD male midbrain" trait: see + # test_search.py. `lod` is `lrs` / 4.61. + if not database_reachable(): + self.skipTest("no database on 127.0.0.1:3306") + + response, body = self.get("/groups/BXD/traits/17985") + self.assertEqual(response.status, 200) + + info = json.loads(body) + self.assertEqual(info["locus"], "rsm10000012461") + self.assertAlmostEqual(info["lod"], info["lrs"] / 4.61) + self.assertAlmostEqual(info["lod"], 2.603, places=3) + self.assertAlmostEqual(info["additive"], -1.3041, places=4) + def test_group_trait_info_bxd_returns_phenotype_and_publication(self): if not database_reachable(): self.skipTest("no database on 127.0.0.1:3306") |
