[sagemath] 01/01: Disable some cmdline tests that we removed from the cmdline
Ximin Luo
infinity0 at debian.org
Tue Dec 13 22:03:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository sagemath.
commit d24822ca19ac97011cc1ee417331ff0bb5bf3535
Author: Ximin Luo <infinity0 at debian.org>
Date: Tue Dec 13 23:03:35 2016 +0100
Disable some cmdline tests that we removed from the cmdline
---
debian/patches/d1-sage-cli.patch | 123 ++++++++++++++++++++++++++++++++
debian/patches/df-python_security.patch | 6 +-
2 files changed, 126 insertions(+), 3 deletions(-)
diff --git a/debian/patches/d1-sage-cli.patch b/debian/patches/d1-sage-cli.patch
index 707170a..0f22a80 100644
--- a/debian/patches/d1-sage-cli.patch
+++ b/debian/patches/d1-sage-cli.patch
@@ -574,3 +574,126 @@ Forwarded: not-needed
SAGE_BANNER=no sage_setup
unset TERM # See Trac #12263
exec sage-run "$@"
+--- a/sage/src/sage/tests/cmdline.py
++++ b/sage/src/sage/tests/cmdline.py
+@@ -15,8 +15,6 @@
+ --cython
+ --dev
+ --ecl
+---experimental
+---fixdoctests
+ --gap
+ --gdb
+ --gp
+@@ -29,7 +27,6 @@
+ --maxima
+ --min
+ --mwrank
+---optional
+ --preparse
+ --python
+ -q
+@@ -215,19 +212,6 @@
+ sage: ret
+ 0
+
+- sage: out, err, ret = test_executable(["sage", "-p", "--info", "--info", "sqlite"])
+- sage: print(out)
+- Found local metadata for sqlite-...
+- = SQLite =
+- ...
+- SQLite is a software library that implements a self-contained,
+- serverless, zero-configuration, transactional SQL database engine.
+- ...
+- sage: err
+- ''
+- sage: ret
+- 0
+-
+ Test ``sage-run`` on a Python file, both with an absolute and with a relative path::
+
+ sage: dir = tmp_dir(); name = 'python_test_file.py'
+@@ -414,50 +398,6 @@
+ ...
+ RuntimeError: refusing to run doctests...
+
+- Now run a test for the fixdoctests script and, in particular, check that the
+- issues raised in :trac:`10589` are fixed. We have to go to slightly silly
+- lengths to doctest the output.::
+-
+- sage: test='r\"\"\"Add a doc-test for the fixdoctest command line option and, in particular, check that\n:trac:`10589` is fixed.\n\nEXAMPLES::\n\n sage: 1+1 # incorrect output\n 3\n sage: m=matrix(ZZ,3) # output when none is expected\n [0 0 0]\n [0 0 0]\n [1 0 0]\n sage: (2/3)*m # no output when it is expected\n sage: mu=PartitionTuple([[4,4],[3,3,2,1],[1,1]]) # output when none is expected\n [4, 4, 3, 3, 2, 1, 1]\n sage: m [...]
+- sage: test_file = os.path.join(tmp_dir(), 'test_file.py')
+- sage: F = open(test_file, 'w')
+- sage: F.write(test)
+- sage: F.close()
+- sage: (out, err, ret) = test_executable(["sage", "--fixdoctests", test_file])
+- sage: with open(test_file, 'r') as f:
+- ....: fixed_test = f.read()
+- sage: import difflib
+- sage: list(difflib.unified_diff(test.splitlines(), fixed_test.splitlines()))[2:-1]
+- ['@@ -4,18 +4,23 @@\n',
+- ' EXAMPLES::',
+- ' ',
+- ' sage: 1+1 # incorrect output',
+- '- 3',
+- '+ 2',
+- ' sage: m=matrix(ZZ,3) # output when none is expected',
+- '+ sage: (2/3)*m # no output when it is expected',
+- ' [0 0 0]',
+- ' [0 0 0]',
+- '- [1 0 0]',
+- '- sage: (2/3)*m # no output when it is expected',
+- '+ [0 0 0]',
+- ' sage: mu=PartitionTuple([[4,4],[3,3,2,1],[1,1]]) # output when none is expected',
+- '- [4, 4, 3, 3, 2, 1, 1]',
+- ' sage: mu.pp() # uneven indentation',
+- '- ****',
+- '- ****',
+- '+ **** *** *',
+- '+ **** *** *',
+- '+ **',
+- '+ *',
+- ' sage: PartitionTuples.options(convention="French")',
+- ' sage: mu.pp() # fix doctest with uneven indentation',
+- '+ *',
+- '+ **',
+- '+ **** *** *',
+- '+ **** *** *',
+- ' sage: PartitionTuples.options._reset()']
+-
+ Test external programs being called by Sage::
+
+ sage: (out, err, ret) = test_executable(["sage", "--sh"], "echo Hello World\nexit 42\n")
+@@ -599,32 +539,6 @@
+ sage: ret
+ 0
+
+- Check some things requiring an internet connection::
+-
+- sage: (out, err, ret) = test_executable(["sage", "--standard"]) # optional - internet
+- sage: out.find("atlas") >= 0 # optional - internet
+- True
+- sage: err # optional - internet
+- ''
+- sage: ret # optional - internet
+- 0
+-
+- sage: (out, err, ret) = test_executable(["sage", "--optional"]) # optional - internet
+- sage: out.find("database_cremona_ellcurve") >= 0 # optional - internet
+- True
+- sage: err # optional - internet
+- ''
+- sage: ret # optional - internet
+- 0
+-
+- sage: (out, err, ret) = test_executable(["sage", "--experimental"]) # optional - internet
+- sage: out.find("macaulay2") >= 0 # optional - internet
+- True
+- sage: err # optional - internet
+- ''
+- sage: ret # optional - internet
+- 0
+-
+ Check an illegal command line option. This outputs an error to stdout,
+ but we allow stderr in case this changes in the future::
+
diff --git a/debian/patches/df-python_security.patch b/debian/patches/df-python_security.patch
index 4daefc2..fea8a6d 100644
--- a/debian/patches/df-python_security.patch
+++ b/debian/patches/df-python_security.patch
@@ -35,7 +35,7 @@
with open(os.devnull, 'w') as dev_null:
--- a/sage/src/sage/tests/cmdline.py
+++ b/sage/src/sage/tests/cmdline.py
-@@ -396,23 +396,24 @@
+@@ -380,23 +380,24 @@
sage: ret
1
@@ -74,5 +74,5 @@
+ # ...
+ # RuntimeError: refusing to run doctests...
- Now run a test for the fixdoctests script and, in particular, check that the
- issues raised in :trac:`10589` are fixed. We have to go to slightly silly
+ Test external programs being called by Sage::
+
--
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