1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
Description: Fix test
Author: Andreas Tille <tille@debian.org>
Last-Update: Fri, 15 Dec 2023 22:10:49 +0100
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -235,7 +235,7 @@ class TopLevelTests(TestCase):
self.ord_res.proportion_explained = \
self.ord_res.proportion_explained[:1].copy()
- with self.assertRaisesRegexp(ValueError, "Ordinations with less than "
+ with self.assertRaisesRegex(ValueError, "Ordinations with less than "
"two dimensions are not supported"):
Emperor(self.ord_res, self.mf, remote=False)
@@ -243,7 +243,7 @@ class TopLevelTests(TestCase):
mf = self.mf.copy()
mf.drop(['PC.354', 'PC.355', 'PC.356', 'PC.481', 'PC.607', 'PC.636'],
inplace=True)
- with self.assertRaisesRegexp(KeyError, "There are samples not "
+ with self.assertRaisesRegex(KeyError, "There are samples not "
"included in the sample mapping file. "
"Override this error by using the "
"`ignore_missing_samples` argument. "
@@ -255,7 +255,7 @@ class TopLevelTests(TestCase):
def test_initial_unbalanced(self):
mf = self.mf.copy()
mf.drop(['PC.354'], inplace=True)
- with self.assertRaisesRegexp(KeyError, "There are samples not "
+ with self.assertRaisesRegex(KeyError, "There are samples not "
"included in the sample mapping file. "
"Override this error by using the "
"`ignore_missing_samples` argument. "
@@ -265,7 +265,7 @@ class TopLevelTests(TestCase):
# test feature metadata
fmf = self.feature_mf.copy()
fmf.drop(['f.PC.636'], inplace=True)
- with self.assertRaisesRegexp(KeyError, "There are features not "
+ with self.assertRaisesRegex(KeyError, "There are features not "
"included in the feature mapping file. "
"Override this error by using the "
"`ignore_missing_samples` argument. "
@@ -321,7 +321,7 @@ class TopLevelTests(TestCase):
mf = self.mf.copy()
mf.index = mf.index + '.not'
- with self.assertRaisesRegexp(ValueError, 'None of the sample '
+ with self.assertRaisesRegex(ValueError, 'None of the sample '
'identifiers match between the metadata '
'and the coordinates. Verify that you are'
' using metadata and coordinates '
@@ -331,7 +331,7 @@ class TopLevelTests(TestCase):
fmf = self.feature_mf.copy()
fmf.index = fmf.index + '.not'
- with self.assertRaisesRegexp(ValueError, 'None of the feature '
+ with self.assertRaisesRegex(ValueError, 'None of the feature '
'identifiers match between the metadata '
'and the coordinates. Verify that you are'
' using metadata and coordinates '
|