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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
--- a/sage/src/sage/doctest/control.py
+++ b/sage/src/sage/doctest/control.py
@@ -618,19 +618,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
@@ -368,23 +368,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...
Test external programs being called by Sage::
|