sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.42k stars 477 forks source link

3 other internet doctests failing in oeis.py #26125

Closed seblabbe closed 6 years ago

seblabbe commented 6 years ago

With 8.4.beta1:

sage -t --long --optional=sage,optional,external src/sage/databases/oeis.py

gives

sage -t --long src/sage/databases/oeis.py
**********************************************************************
File "src/sage/databases/oeis.py", line 1423, in sage.databases.oeis.OEISSequence.links
Failed example:
    f.links(format='url')                             # optional -- internet
Expected:
    0: http://oeis.org/A000045/b000045.txt
    1: http://library.thinkquest.org/27890/theSeries.html
    ...
Got:
      0: http://oeis.org/A000045/b000045.txt
      1: http://dx.doi.org/10.1016/j.disc.2014.06.026
      2: http://library.thinkquest.org/27890/theSeries.html
...
    177: http://www.cs.uwaterloo.ca/journals/JIS/VOL8/Zhang/zhang56.html
    178: http://oeis.org/index/Cor#core
    179: http://oeis.org/index/Di#divseq
    180: http://oeis.org/index/Par#partN
    181: http://oeis.org/index/Rec#order_02
    182: http://oeis.org/index/Tu#2wis
    183: http://oeis.org/index/Be#Benford
**********************************************************************

**********************************************************************
File "src/sage/databases/oeis.py", line 1428, in sage.databases.oeis.OEISSequence.links
Failed example:
    f.links(format='raw')                 # optional -- internet
Expected:
    0: N. J. A. Sloane, <a href="/A000045/b000045.txt">The first 2000 Fibonacci numbers: Table of n, F(n) for n = 0..2000</a>
    1: Matt Anderson, Jeffrey Frazier and Kris Popendorf, <a href="http://library.thinkquest.org/27890/theSeries.html">The Fibonacci series: the section index</a> [broken link]
    ...
Got:
      0: N. J. A. Sloane, <a href="/A000045/b000045.txt">The first 2000 Fibonacci numbers: Table of n, F(n) for n = 0..2000</a>
      1: Marco Abrate, Stefano Barbero, Umberto Cerruti, Nadir Murru, <a href="http://dx.doi.org/10.1016/j.disc.2014.06.026">Colored compositions, Invert operator and elegant compositions with the "black tie"</a>, Discrete Math. 335 (2014), 1--7. MR3248794.
      2: Matt Anderson, Jeffrey Frazier and Kris Popendorf, <a href="http://library.thinkquest.org/27890/theSeries.html">The Fibonacci series: the section index</a> [broken link]
...
    171: <a href="/index/Di#divseq">Index to divisibility sequences</a>
    172: <a href="/index/Par#partN">Index entries for related partition-counting sequences</a>
    173: <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,1).
    174: <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>
    175: <a href="/index/Be#Benford">Index entries for sequences related to Benford's law</a>
**********************************************************************
File "src/sage/databases/oeis.py", line 1522, in sage.databases.oeis.OEISSequence.cross_references
Failed example:
    nbalanced.cross_references(fetch=True)    # optional -- internet
Expected:
    0: A049703: a(0) = 0; for n>0, a(n) = A005598(n)/2.
    1: A049695: Array T read by diagonals; T(i,j)=number of nonnegative slopes of lines determined by 2 lattice points in [ 0,i ] X [ 0,j ] if i>0; T(0,j)=1 if j>0; T(0,0)=0.
    2: A103116: a(n) = A005598(n) - 1.
    3: A000010: Euler totient function phi(n): count numbers <= n and prime to n.
Got:
    0: A049703: a(0) = 0; for n>0, a(n) = A005598(n)/2.
    1: A049695: Array T read by diagonals; T(i,j) is the number of nonnegative slopes of lines determined by 2 lattice points in [ 0,i ] X [ 0,j ] if i > 0; T(0,j)=1 if j > 0; T(0,0)=0.
    2: A103116: a(n) = A005598(n) - 1.
    3: A000010: Euler totient function phi(n): count numbers <= n and prime to n.
**********************************************************************
2 items had failures:
   1 of   7 in sage.databases.oeis.OEISSequence.cross_references
   2 of   9 in sage.databases.oeis.OEISSequence.links
    [259 tests, 3 failures, 43.23 s]

CC: @vinklein

Component: doctest coverage

Author: Sébastien Labbé

Branch/Commit: ba4878d

Reviewer: Vincent Klein

Issue created by migration from https://trac.sagemath.org/ticket/26125

seblabbe commented 6 years ago

Branch: u/slabbe/26125

seblabbe commented 6 years ago

New commits:

ba4878d26125: fixing failing internet doctests
seblabbe commented 6 years ago

Commit: ba4878d

seblabbe commented 6 years ago

Author: Sébastien Labbé

4a781b2b-eada-4ae4-9b46-f6cbb63459b9 commented 6 years ago
comment:4

Looks good to me.

4a781b2b-eada-4ae4-9b46-f6cbb63459b9 commented 6 years ago

Reviewer: Vincent Klein

vbraun commented 6 years ago

Changed branch from u/slabbe/26125 to ba4878d