-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import numpy as np | ||
|
||
from yhaplo.config import Config | ||
from yhaplo.tree import Tree | ||
from yhaplo.utils.context_managers import logging_disabled | ||
|
||
|
||
def test_hg_snp_idempotency(): | ||
config = Config(suppress_output=True) | ||
with logging_disabled(): | ||
tree_1 = Tree(config) | ||
tree_2 = Tree(config) | ||
|
||
hg_snps_1 = np.array([node.hg_snp for node in tree_1.depth_first_node_list]) | ||
hg_snps_2 = np.array([node.hg_snp for node in tree_2.depth_first_node_list]) | ||
|
||
assert (hg_snps_1 == hg_snps_2).all() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters