Skip to content

Commit 946b12e

Browse files
authored
LANG: 2025.10 updates & pin templating
2 parents c347dcf + 7ef75fd commit 946b12e

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

q2_boots/tests/test_beta.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from unittest import TestCase, main
1010

1111
import pandas as pd
12+
import numpy.testing as npt
1213
import qiime2
1314

1415
import skbio
@@ -213,7 +214,10 @@ def test_beta_collection_phylogenetic(self):
213214
self.assertEqual(len(observed), 10)
214215
for o in observed.values():
215216
o = o.view(skbio.DistanceMatrix)
216-
self.assertEqual(o, expected)
217+
self.assertEqual(o.ids, expected.ids)
218+
# Floating point error seemingly induced by going from
219+
# unifrac_binaries=1.4 to unifrac_binaries=1.5 made this necessary
220+
npt.assert_allclose(o.data, expected.data)
217221

218222

219223
class BetaTests(TestPluginBase):

q2_boots/tests/test_core_metrics.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from qiime2.plugin.testing import TestPluginBase
1111
from qiime2.plugin import Visualization
1212
import pandas as pd
13+
import numpy.testing as npt
1314
import pandas.testing as pdt
1415
import skbio
1516

@@ -197,8 +198,12 @@ def test_core_metrics_phylogenetic(self):
197198
[[0, 0.25], [0.25, 0]], ids=['S1', 'S2'])
198199
observed_unweighted_unifrac = \
199200
output[2]['unweighted_unifrac'].view(skbio.DistanceMatrix)
200-
self.assertEqual(observed_unweighted_unifrac,
201-
expected_unweighted_unifrac)
201+
# Floating point error seemingly induced by going from
202+
# unifrac_binaries=1.4 to unifrac_binaries=1.5 made this necessary
203+
self.assertEqual(observed_unweighted_unifrac.ids,
204+
expected_unweighted_unifrac.ids)
205+
npt.assert_allclose(observed_unweighted_unifrac.data,
206+
expected_unweighted_unifrac.data)
202207

203208
# vizard scatter plot returned
204209
self.assertEqual(output[5].type, Visualization)

0 commit comments

Comments
 (0)