Skip to content

Commit 517bbcd

Browse files
committed
fix doctests in src/sage/databases/oeis.py
1 parent e249bef commit 517bbcd

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/sage/databases/oeis.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def _fetch(url):
177177
178178
TESTS::
179179
180-
sage: from sage.databases.oeis import _fetch, oeis_url
180+
sage: from sage.databases.oeis import _fetch, oeis_url # optional -- internet
181181
sage: _fetch(oeis_url + 'hints.html')[-8:-1] # optional -- internet
182182
'</html>'
183183
"""
@@ -309,12 +309,12 @@ class OEIS:
309309
14930352, 24157817, 39088169, 63245986, 102334155)
310310
311311
sage: fibo.cross_references()[0] # optional -- internet
312-
'A039834'
312+
'A001622'
313313
314314
sage: fibo == oeis(45) # optional -- internet
315315
True
316316
317-
sage: sfibo = oeis('A039834')
317+
sage: sfibo = oeis('A039834') # optional -- internet
318318
sage: sfibo.first_terms() # optional -- internet
319319
(1, 1, 0, 1, -1, 2, -3, 5, -8, 13, -21, 34, -55, 89, -144, 233,
320320
-377, 610, -987, 1597, -2584, 4181, -6765, 10946, -17711, 28657,
@@ -707,11 +707,12 @@ def online_update(self):
707707
708708
TESTS::
709709
710+
sage: # optional -- internet
710711
sage: s = oeis._imaginary_sequence(ident='A004238')
711712
sage: s
712713
A004238: The characteristic sequence of 42 plus one, starting from 38.
713-
sage: s.online_update() # optional -- internet
714-
sage: s # optional -- internet
714+
sage: s.online_update()
715+
sage: s
715716
A004238: a(n) = 100*log(n) rounded to nearest integer.
716717
"""
717718
options = {'q': self._id, 'n': '1', 'fmt': 'text'}
@@ -832,7 +833,7 @@ def raw_entry(self):
832833
A000045: Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
833834
834835
sage: print(f.raw_entry()) # optional -- internet
835-
%I A000045 M0692 N0256
836+
%I A000045 M0692 N0256...
836837
%S A000045 0,1,1,2,3,5,8,13,21,34,55,89,144,...
837838
%T A000045 10946,17711,28657,46368,...
838839
...
@@ -890,7 +891,7 @@ def old_IDs(self):
890891
A000045: Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
891892
892893
sage: f.old_IDs() # optional -- internet
893-
('M0692', 'N0256')
894+
('M0692', 'N0256'...)
894895
895896
TESTS::
896897
@@ -1111,7 +1112,7 @@ def is_dead(self, warn_only=False):
11111112
A warning is triggered if any field of a dead sequence is accessed,
11121113
unless :meth:`is_dead` is called before::
11131114
1114-
sage: s = oeis(17)
1115+
sage: s = oeis(17) # optional -- internet
11151116
sage: s # optional -- internet
11161117
doctest:warning
11171118
...
@@ -1803,6 +1804,7 @@ def show(self):
18031804
URL
18041805
https://oeis.org/A012345
18051806
<BLANKLINE>
1807+
...
18061808
AUTHOR
18071809
Patrick Demichel (patrick.demichel(AT)hp.com)
18081810
<BLANKLINE>

0 commit comments

Comments
 (0)