[sagemath] 03/03: Prevent doctests to fail when looking for optional packages.
Tobias Hansen
thansen at moszumanska.debian.org
Sun Nov 20 18:21:15 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository sagemath.
commit ef4c2a27c87a34f201944e2f28152cd435f0cd20
Author: Tobias Hansen <thansen at broeselmaschine.fc.up.pt>
Date: Sun Nov 20 18:20:52 2016 +0000
Prevent doctests to fail when looking for optional packages.
---
debian/patches/debian-test-optional.patch | 28 ++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 29 insertions(+)
diff --git a/debian/patches/debian-test-optional.patch b/debian/patches/debian-test-optional.patch
new file mode 100644
index 0000000..974eecd
--- /dev/null
+++ b/debian/patches/debian-test-optional.patch
@@ -0,0 +1,28 @@
+Description: Do not look for optional packages when running the testsuite
+Origin: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/sagemath
+
+--- a/sage/src/sage/doctest/control.py
++++ b/sage/src/sage/doctest/control.py
+@@ -307,22 +307,6 @@
+ if "all" in options.optional:
+ # Special case to run all optional tests
+ options.optional = True
+- else:
+- # We replace the 'optional' tag by all optional
+- # packages for which the installed version matches the
+- # latest available version (this implies in particular
+- # that the package is actually installed).
+- if 'optional' in options.optional:
+- options.optional.discard('optional')
+- from sage.misc.package import list_packages
+- for pkg in list_packages('optional', local=True).values():
+- if pkg['installed_version'] == pkg['remote_version']:
+- options.optional.add(pkg['name'])
+-
+- # Check that all tags are valid
+- for o in options.optional:
+- if not optionaltag_regex.search(o):
+- raise ValueError('invalid optional tag {!r}'.format(o))
+
+ self.options = options
+ self.files = args
diff --git a/debian/patches/series b/debian/patches/series
index dd1a7e3..a000376 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -45,6 +45,7 @@ debian-cython-sys-path.patch
debian-sage-gap-reset.patch
debian-pip-nowarn.patch
# this next one contains some stuff that should be forwarded upstream
+debian-test-optional.patch
debian-fix-trivial-test-cases.patch
debian-install-paths.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git
More information about the debian-science-commits
mailing list