[med-svn] [Git][med-team/emperor][master] 3 commits: Fix test

Andreas Tille (@tille) gitlab at salsa.debian.org
Fri Dec 15 22:33:21 GMT 2023



Andreas Tille pushed to branch master at Debian Med / emperor


Commits:
61c3d715 by Andreas Tille at 2023-12-15T22:40:47+01:00
Fix test

- - - - -
6faac7b6 by Andreas Tille at 2023-12-15T23:19:42+01:00
Apply patches in run-unit-test

- - - - -
4a4c3aa4 by Andreas Tille at 2023-12-15T23:33:00+01:00
Upload to unstable

- - - - -


5 changed files:

- debian/changelog
- debian/patches/no_future_dependency.patch
- + debian/patches/python3.12,patch
- debian/patches/series
- debian/tests/run-unit-test


Changes:

=====================================
debian/changelog
=====================================
@@ -1,4 +1,4 @@
-emperor (1.0.3+ds-7exp2) UNRELEASED; urgency=medium
+emperor (1.0.3+ds-8) unstable; urgency=medium
 
   * Team upload.
 
@@ -9,6 +9,7 @@ emperor (1.0.3+ds-7exp2) UNRELEASED; urgency=medium
   [ Andreas Tille ]
   * Remove trailing whitespace in debian/changelog (routine-update)
   * Build-Depends: s/dh-python/dh-sequence-python3/ (routine-update)
+  * Fix test
 
  -- Andreas Tille <tille at debian.org>  Fri, 15 Dec 2023 22:10:49 +0100
 


=====================================
debian/patches/no_future_dependency.patch
=====================================
@@ -14,3 +14,14 @@ Last-Update: Fri, 15 Dec 2023 22:10:49 +0100
  doc = ["Sphinx", "sphinx-bootstrap-theme", "numpydoc"]
  test = ["pep8", "flake8", "nose"]
  all_deps = base + doc + test
+--- a/tests/test_core.py
++++ b/tests/test_core.py
+@@ -5,8 +5,6 @@
+ #
+ # The full license is in the file LICENSE.md, distributed with this software.
+ # ----------------------------------------------------------------------------
+-from __future__ import division
+-
+ from unittest import TestCase, main
+ from copy import deepcopy
+ from os.path import exists


=====================================
debian/patches/python3.12,patch
=====================================
@@ -0,0 +1,60 @@
+Description: Fix test
+Author: Andreas Tille <tille at 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 '


=====================================
debian/patches/series
=====================================
@@ -4,3 +4,4 @@ EditSectionTitle.patch
 # ignore_one_failing_test.patch
 8b803cd81586b832550eaa2428fa2d0dd581d35f.patch
 no_future_dependency.patch
+python3.12,patch


=====================================
debian/tests/run-unit-test
=====================================
@@ -10,6 +10,8 @@ if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
   trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
 fi
 
+QUILT_PATCHES=debian/patches quilt push -a || true
+
 cp -a ${CUR_DIR}/tests "${AUTOPKGTEST_TMP}"
 
 cd "${AUTOPKGTEST_TMP}"
@@ -24,3 +26,7 @@ do
 done
 
 echo "PASS"
+
+cd ${CUR_DIR}
+
+QUILT_PATCHES=debian/patches quilt pop -a || true



View it on GitLab: https://salsa.debian.org/med-team/emperor/-/compare/3ba7215774b263f36542c8fc2c5859bd6e3d0a35...4a4c3aa4cad762974555feb99dd979a77519332b

-- 
View it on GitLab: https://salsa.debian.org/med-team/emperor/-/compare/3ba7215774b263f36542c8fc2c5859bd6e3d0a35...4a4c3aa4cad762974555feb99dd979a77519332b
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231215/94edfb56/attachment-0001.htm>


More information about the debian-med-commit mailing list