File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,19 @@ def test_mutations_have_valid_fields(self):
345345 assert isinstance (m .position , float )
346346 assert isinstance (m .derived_state , int )
347347
348+ def test_match_with_custom_recombination_and_mismatch (self ):
349+ """Custom per-source recombination/mismatch overrides are used."""
350+ hap = np .array ([0 , 1 , 0 ], dtype = np .int8 )
351+ ts = self ._make_ts_with_one_ancestor (hap )
352+ source_params = {
353+ "test" : config .MatchSourceConfig (recombination = 0.5 , mismatch = 0.1 ),
354+ }
355+ matcher = matching .Matcher (ts , self .positions , source_parameters = source_params )
356+ results = list (matcher .match (_jobs (1 ), _ArrayReader ([hap ])))
357+ assert len (results ) == 1
358+ _ , r = results [0 ]
359+ assert len (r .path ) > 0
360+
348361
349362# ---------------------------------------------------------------------------
350363# TestExtendTs
You can’t perform that action at this time.
0 commit comments