[sagemath] 08/09: Added a patch to silence tests related to python's issue 16202

Julien Puydt julien.puydt at laposte.net
Fri Mar 13 22:05:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository sagemath.

commit 73ad81913823db9b9f992dd1ac43efd61b80d42a
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Fri Mar 13 23:03:13 2015 +0100

    Added a patch to silence tests related to python's issue 16202
---
 debian/patches/python_security.patch | 78 ++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/debian/patches/python_security.patch b/debian/patches/python_security.patch
new file mode 100644
index 0000000..8d789ed
--- /dev/null
+++ b/debian/patches/python_security.patch
@@ -0,0 +1,78 @@
+--- a/sage/src/sage/doctest/control.py
++++ b/sage/src/sage/doctest/control.py
+@@ -451,19 +451,20 @@
+         ``sage/tests/cmdline.py`` for a doctest that this works, see
+         also :trac:`13579`.
+ 
+-        TESTS::
++        # FIXME: this is related to upstream http://bugs.python.org/issue16202
++        # TESTS::
+ 
+-            sage: from sage.doctest.control import DocTestDefaults, DocTestController
+-            sage: DD = DocTestDefaults()
+-            sage: DC = DocTestController(DD, [])
+-            sage: DC.test_safe_directory()
+-            sage: d = os.path.join(tmp_dir(), "test")
+-            sage: os.mkdir(d)
+-            sage: os.chmod(d, 0o777)
+-            sage: DC.test_safe_directory(d)
+-            Traceback (most recent call last):
+-            ...
+-            RuntimeError: refusing to run doctests...
++        #     sage: from sage.doctest.control import DocTestDefaults, DocTestController
++        #     sage: DD = DocTestDefaults()
++        #     sage: DC = DocTestController(DD, [])
++        #     sage: DC.test_safe_directory()
++        #     sage: d = os.path.join(tmp_dir(), "test")
++        #     sage: os.mkdir(d)
++        #     sage: os.chmod(d, 0o777)
++        #     sage: DC.test_safe_directory(d)
++        #     Traceback (most recent call last):
++        #     ...
++        #     RuntimeError: refusing to run doctests...
+         """
+         import subprocess
+         with open(os.devnull, 'w') as dev_null:
+--- a/sage/src/sage/tests/cmdline.py
++++ b/sage/src/sage/tests/cmdline.py
+@@ -373,23 +373,24 @@
+         sage: ret
+         1
+ 
+-    Check that Sage refuses to run doctests from a directory whose
+-    permissions are too loose.  We create a world-writable directory
+-    inside a safe temporary directory to test this::
++    # FIXME: this is related to upstream http://bugs.python.org/issue16202
++    # Check that Sage refuses to run doctests from a directory whose
++    # permissions are too loose.  We create a world-writable directory
++    # inside a safe temporary directory to test this::
+ 
+-        sage: d = os.path.join(tmp_dir(), "test")
+-        sage: os.mkdir(d)
+-        sage: os.chmod(d, 0o777)
+-        sage: (out, err, ret) = test_executable(["sage", "-t", "nonexisting.py"], cwd=d)
+-        sage: print err
+-        Traceback (most recent call last):
+-        ...
+-        RuntimeError: refusing to run doctests...
+-        sage: (out, err, ret) = test_executable(["sage", "-tp", "1", "nonexisting.py"], cwd=d)
+-        sage: print err
+-        Traceback (most recent call last):
+-        ...
+-        RuntimeError: refusing to run doctests...
++    #     sage: d = os.path.join(tmp_dir(), "test")
++    #     sage: os.mkdir(d)
++    #     sage: os.chmod(d, 0o777)
++    #     sage: (out, err, ret) = test_executable(["sage", "-t", "nonexisting.py"], cwd=d)
++    #     sage: print err
++    #     Traceback (most recent call last):
++    #     ...
++    #     RuntimeError: refusing to run doctests...
++    #     sage: (out, err, ret) = test_executable(["sage", "-tp", "1", "nonexisting.py"], cwd=d)
++    #     sage: print err
++    #     Traceback (most recent call last):
++    #     ...
++    #     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

-- 
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