File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ def _process_tree_yaml(
7777 _rename_iq_tree (tree , names )
7878
7979 tree .name_unnamed_nodes ()
80+ tree .params ["model" ] = str (model )
8081
8182 return tree
8283
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ def check_build_tree_model(
3434 assert expected .same_topology (got .unrooted ())
3535 # Check if branch lengths exist
3636 assert all (v .length is not None for v in got .get_edge_vector (include_root = False ))
37+ assert got .params ["model" ] == str (model )
3738
3839
3940def check_build_tree (
Original file line number Diff line number Diff line change 1111from piqtree .model import Model , StandardDnaModel
1212
1313
14+ def check_model_name (got : PhyloNode , expected : str ) -> None :
15+ got_model = cast ("str" , got .params .get ("model" ))
16+ assert got_model == expected
17+
18+
1419def check_likelihood (got : PhyloNode , expected : model_result ) -> None :
1520 assert got .params ["lnL" ] == pytest .approx (expected .lnL )
1621
@@ -95,6 +100,7 @@ def test_fit_tree(
95100 check_motif_probs (got , expected .tree )
96101 check_rate_parameters (got , expected .tree )
97102 check_branch_lengths (got , expected .tree )
103+ check_model_name (got , str (model ))
98104
99105
100106@pytest .mark .parametrize (
You can’t perform that action at this time.
0 commit comments