Skip to content

Commit 579b15f

Browse files
committed
Added a new test for parameter parsing.
1 parent 90bfc35 commit 579b15f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/maverick_functions_tests.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,27 @@ def test_mav_ti_in_use():
5555
assert mw.mav_ti_in_use({}) is True
5656

5757

58+
def test_mav_params_parser():
59+
"""
60+
Test if maverick parameters are being parsed correctlly.
61+
"""
62+
mock_parameters = {'headerRow_on': 't', 'popCol_on': 't',
63+
'ploidyCol_on': 'f', 'ploidy': '2', 'missingData': '-9',
64+
'Kmin': '1', 'Kmax': '4', 'admix_on': 't',
65+
'fixAlpha_on': 'f', 'alpha': '1.0',
66+
'alphaPropSD': '0.10', 'exhaustive_on': 'f',
67+
'mainRepeats': '5', 'mainBurnin': '500',
68+
'mainSamples': '4000', 'thermodynamic_on': 't',
69+
'thermodynamicRungs': '20',
70+
'thermodynamicBurnin': '1000',
71+
'thermodynamicSamples': '5000', 'outputLog_on': 't',
72+
'outputLikelihood_on': 't', 'outputQmatrix_ind_on': 't',
73+
'outputQmatrix_pop_on': 't', 'outputEvidence_on': 't',
74+
'outputEvidenceDetails_on': 't'}
75+
76+
assert mw.mav_params_parser("smalldata/parameters.txt") == mock_parameters
77+
78+
5879
def test_mav_alpha_failsafe():
5980
"""
6081
Tests if mav_alpha_failsafe() is working correctlly.

0 commit comments

Comments
 (0)