Skip to content

Commit 70cd6b4

Browse files
committed
Revert "regain test coverage for default sample sets"
This reverts commit 6685399.
1 parent 6685399 commit 70cd6b4

1 file changed

Lines changed: 7 additions & 22 deletions

File tree

python/tests/test_ld_matrix.py

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2594,33 +2594,18 @@ def ts_multiallelic_fixture():
25942594
return ts
25952595

25962596

2597-
def assert_no_norm_func(*_):
2598-
"""Used in biallelic tests"""
2599-
raise Exception("Normalisation function should not be called for biallelic sites")
2600-
2601-
2602-
@pytest.mark.parametrize("stat", SUMMARY_FUNCS.keys())
2603-
def test_general_two_locus_site_stat_default_sample_sets(
2604-
stat, ts_100_samp_with_sites_fixture
2605-
):
2606-
ts = ts_100_samp_with_sites_fixture
2607-
# In addition to not needing a normalisation function, normalisation is also
2608-
# not required because these sites are biallelic.
2609-
ldg = ts.two_locus_count_stat(
2610-
[ts.samples()], getattr(GeneralStatFuncs, stat), 2, norm_f=assert_no_norm_func
2611-
)
2612-
ld = ts.ld_matrix(stat=stat) # use default sample sets
2613-
np.testing.assert_array_almost_equal(ldg, ld)
2614-
2615-
26162597
@pytest.mark.parametrize("stat", SUMMARY_FUNCS.keys())
2617-
def test_general_two_locus_site_stat_two_sample_sets(
2618-
stat, ts_100_samp_with_sites_fixture
2619-
):
2598+
def test_general_two_locus_site_stat(stat, ts_100_samp_with_sites_fixture):
26202599
ts = ts_100_samp_with_sites_fixture
26212600
sample_sets = [ts.samples()[0:50], ts.samples()[50:100]]
2601+
26222602
# In addition to not needing a normalisation function, normalisation is also
26232603
# not required because these sites are biallelic.
2604+
def assert_no_norm_func(*_):
2605+
raise Exception(
2606+
"Normalisation function should not be called for biallelic sites"
2607+
)
2608+
26242609
ldg = ts.two_locus_count_stat(
26252610
sample_sets, getattr(GeneralStatFuncs, stat), 2, norm_f=assert_no_norm_func
26262611
)

0 commit comments

Comments
 (0)