Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #26304: doctests in src/sage/repl/attach.py and src/sage/repl/lo…
…ad.py fail when test.py is present in folder from where doctests are run First reported at https://groups.google.com/d/msg/sage- release/eL75kEvaCeA/T6_kmPNCCQAJ. If an empty `test.py` is present in SAGE_ROOT then {{{ sage -t --long src/sage/repl/attach.py ********************************************************************** File "src/sage/repl/attach.py", line 171, in sage.repl.attach.load_attach_path Failed example: attach('test.py') Expected: Traceback (most recent call last): ... IOError: did not find file 'test.py' to load or attach Got: <BLANKLINE> ********************************************************************** File "src/sage/repl/attach.py", line 176, in sage.repl.attach.load_attach_path Failed example: attach('test.py') Expected: 111 Got: <BLANKLINE> ********************************************************************** File "src/sage/repl/attach.py", line 178, in sage.repl.attach.load_attach_path Failed example: attached_files() == [fullpath] Expected: True Got: False ********************************************************************** File "src/sage/repl/attach.py", line 183, in sage.repl.attach.load_attach_path Failed example: load('test.py') Expected: Traceback (most recent call last): ... IOError: did not find file 'test.py' to load or attach Got: <BLANKLINE> ********************************************************************** File "src/sage/repl/attach.py", line 436, in sage.repl.attach.detach Failed example: attach('test.py') Expected: 111 Got: <BLANKLINE> ********************************************************************** File "src/sage/repl/attach.py", line 438, in sage.repl.attach.detach Failed example: attached_files() == [os.path.normpath(fullpath)] Expected: True Got: False ********************************************************************** File "src/sage/repl/attach.py", line 443, in sage.repl.attach.detach Failed example: attach('test.py') Expected: 111 Got: <BLANKLINE> ********************************************************************** 2 items had failures: 3 of 25 in sage.repl.attach.detach 4 of 20 in sage.repl.attach.load_attach_path [127 tests, 7 failures, 2.61 s] ---------------------------------------------------------------------- sage -t --long src/sage/repl/attach.py # 7 doctests failed }}} and {{{ sage -t --long src/sage/repl/load.py ********************************************************************** File "src/sage/repl/load.py", line 180, in sage.repl.load.load Failed example: attach(fname) Expected: 111 Got: <BLANKLINE> ********************************************************************** 1 item had failures: 1 of 34 in sage.repl.load.load [42 tests, 1 failure, 1.90 s] ---------------------------------------------------------------------- sage -t --long src/sage/repl/load.py # 1 doctest failed }}} URL: https://trac.sagemath.org/26304 Reported by: strogdon Ticket author(s): Steven Trogdon Reviewer(s): Erik Bray
- Loading branch information