Opened 18 months ago
Closed 10 months ago
#25614 closed defect (fixed)
2 internet doctest failing in misc/persist.pyx
Reported by: | slabbe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.7 |
Component: | misc | Keywords: | thursdaysbdx |
Cc: | vklein | Merged in: | |
Authors: | Sébastien Labbé | Reviewers: | Vincent Klein |
Report Upstream: | N/A | Work issues: | |
Branch: | 307e663 (Commits) | Commit: | 307e663c7601597a5f44522940db6dfd5c887c23 |
Dependencies: | Stopgaps: |
Description
With 8.3.beta6,
sage -t --long --optional=sage,internet src/sage/misc/persist.pyx
gives
sage -t --long src/sage/misc/persist.pyx ********************************************************************** File "src/sage/misc/persist.pyx", line 78, in sage.misc.persist.load Failed example: s = load(u) # optional - internet Exception raised: Traceback (most recent call last): File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 573, in _run self.compile_and_execute(example, compiler, test.globs) File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 983, in compile_and_execute exec(compiled, globs) File "<doctest sage.misc.persist.load[1]>", line 1, in <module> s = load(u) # optional - internet File "sage/misc/persist.pyx", line 139, in sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2409) ... File "/home/slabbe/GitBox/sage/local/lib/python2.7/socket.py", line 559, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): IOError: [Errno socket error] [Errno -2] Name or service not known ********************************************************************** File "src/sage/misc/persist.pyx", line 81, in sage.misc.persist.load Failed example: s # optional - internet Exception raised: Traceback (most recent call last): File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 573, in _run self.compile_and_execute(example, compiler, test.globs) File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 983, in compile_and_execute exec(compiled, globs) File "<doctest sage.misc.persist.load[2]>", line 1, in <module> s # optional - internet NameError: name 's' is not defined ********************************************************************** 1 item had failures: 2 of 20 in sage.misc.persist.load [99 tests, 2 failures, 1.14 s] ---------------------------------------------------------------------- sage -t --long src/sage/misc/persist.pyx # 2 doctests failed ---------------------------------------------------------------------- Total time for all tests: 2.2 seconds cpu time: 0.6 seconds cumulative wall time: 1.1 seconds External software detected for doctesting: internet
Change History (11)
comment:1 Changed 16 months ago by
comment:2 Changed 16 months ago by
- Branch set to u/slabbe/25614
- Commit set to aac9ba8bf95949d13e79a899ae19783c56f5cbb5
New commits:
aac9ba8 | 25614: fixing failing internet doctest
|
comment:3 Changed 16 months ago by
I updated the adress of the file in the doctest.
Unfortunately, there is now another error:
sage: u = 'http://www.sagemath.org/files/test.sobj' sage: load(u) Attempting to load remote file: http://www.sagemath.org/files/test.sobj Loading: [] Traceback (most recent call last) ... UnpicklingError: invalid load key, '<'.
maybe because the way I suggested Harald to create the file test.sobj was wrong? Strange because if I wget
the file and load
from present working directory then it works.
Help needed!
comment:4 Changed 10 months ago by
- Cc vklein added
comment:5 Changed 10 months ago by
- Commit changed from aac9ba8bf95949d13e79a899ae19783c56f5cbb5 to 307e663c7601597a5f44522940db6dfd5c887c23
comment:6 Changed 10 months ago by
- Keywords thursdaysbdx added
- Status changed from new to needs_review
The fix I proposed months ago now works! Maybe because of #25535, the problem invalid load key
disappeared. Needs review!
comment:7 Changed 10 months ago by
- Owner changed from (none) to vklein
- Reviewers set to Vincent Klein
comment:8 Changed 10 months ago by
- Milestone changed from sage-8.3 to sage-8.7
comment:9 Changed 10 months ago by
- Owner changed from vklein to (none)
comment:10 Changed 10 months ago by
- Status changed from needs_review to positive_review
Looks good to me.
comment:11 Changed 10 months ago by
- Branch changed from u/slabbe/25614 to 307e663c7601597a5f44522940db6dfd5c887c23
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
The failing doctest is:
The link is broken: