Opened 2 years ago

Closed 2 years ago

#27783 closed defect (fixed)

6 doctests failed in src/sage/databases/oeis.py with tag internet

Reported by: slabbe Owned by:
Priority: major Milestone: sage-8.8
Component: doctest coverage Keywords: thursdaysbdx
Cc: Merged in:
Authors: Vincent Klein Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 8542d50 (Commits, GitHub, GitLab) Commit: 8542d5078bd965cb475022963ca90d16ff3ffd4d
Dependencies: Stopgaps:

Status badges

Description

With version 8.8.beta4, Release Date: 2019-05-04,

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

gives

Using --optional=internet,memlimit,sage
Doctesting 1 file.
sage -t --long src/sage/databases/oeis.py
**********************************************************************
File "src/sage/databases/oeis.py", line 290, in sage.databases.oeis.OEIS
Failed example:
    search = oeis([1,2,3,5,8,13]) ; search    # optional -- internet
Expected:
    0: A000045: Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
    1: A027926: Triangular array T read by rows: T(n,0) = T(n,2n) = 1 for n >= 0; T(n,1) = 1 for n >= 1; T(n,k) = T(n-1,k-2) + T(n-1,k-1) for k = 2..2n-1, n >= 2.
    2: ...
Got:
    0: A000045: Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
    1: A290689: Number of transitive rooted trees with n nodes.
    2: A027926: Triangular array T read by rows: T(n,0) = T(n,2n) = 1 for n >= 0; T(n,1) = 1 for n >= 1; T(n,k) = T(n-1,k-2) + T(n-1,k-1) for k = 2..2n-1, n >= 2.
**********************************************************************
File "src/sage/databases/oeis.py", line 334, in sage.databases.oeis.OEIS
Failed example:
    oeis('prime gap factorization', max_results=4)                # optional -- internet
Expected:
    0: A073491: Numbers having no prime gaps in their factorization.
    1: A073490: Number of prime gaps in factorization of n.
    2: A073485: Product of any number of consecutive primes; squarefree numbers with no gaps in their prime factorization.
    3: A073492: Numbers having at least one prime gap in their factorization.
Got:
    0: A073491: Numbers having no prime gaps in their factorization.
    1: A073485: Product of any number of consecutive primes; squarefree numbers with no gaps in their prime factorization.
    2: A073490: Number of prime gaps in factorization of n.
    3: A073492: Numbers having at least one prime gap in their factorization.
**********************************************************************
File "src/sage/databases/oeis.py", line 345, in sage.databases.oeis.OEIS
Failed example:
    oeis([1,2,3,5,8,13])                  # optional -- internet
Expected:
    0: A000045: Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
    1: A027926: Triangular array T read by rows: T(n,0) = T(n,2n) = 1 for n >= 0; T(n,1) = 1 for n >= 1; T(n,k) = T(n-1,k-2) + T(n-1,k-1) for k = 2..2n-1, n >= 2.
    2: ...
Got:
    0: A000045: Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
    1: A290689: Number of transitive rooted trees with n nodes.
    2: A027926: Triangular array T read by rows: T(n,0) = T(n,2n) = 1 for n >= 0; T(n,1) = 1 for n >= 1; T(n,k) = T(n-1,k-2) + T(n-1,k-1) for k = 2..2n-1, n >= 2.
**********************************************************************
File "src/sage/databases/oeis.py", line 356, in sage.databases.oeis.OEIS
Failed example:
    oeis([1,2,3,5,8,13])                  # optional -- internet
Expected:
    0: A000045: Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
    1: A027926: Triangular array T read by rows: T(n,0) = T(n,2n) = 1 for n >= 0; T(n,1) = 1 for n >= 1; T(n,k) = T(n-1,k-2) + T(n-1,k-1) for k = 2..2n-1, n >= 2.
    2: ...
Got:
    0: A000045: Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
    1: A290689: Number of transitive rooted trees with n nodes.
    2: A027926: Triangular array T read by rows: T(n,0) = T(n,2n) = 1 for n >= 0; T(n,1) = 1 for n >= 1; T(n,k) = T(n-1,k-2) + T(n-1,k-1) for k = 2..2n-1, n >= 2.
**********************************************************************
File "src/sage/databases/oeis.py", line 450, in sage.databases.oeis.OEIS.find_by_description
Failed example:
    oeis.find_by_description('prime gap factorization')       # optional -- internet
Expected:
    0: A073491: Numbers having no prime gaps in their factorization.
    1: A073490: Number of prime gaps in factorization of n.
    2: A073485: Product of any number of consecutive primes; squarefree numbers with no gaps in their prime factorization.
Got:
    0: A073491: Numbers having no prime gaps in their factorization.
    1: A073485: Product of any number of consecutive primes; squarefree numbers with no gaps in their prime factorization.
    2: A073490: Number of prime gaps in factorization of n.
**********************************************************************
File "src/sage/databases/oeis.py", line 455, in sage.databases.oeis.OEIS.find_by_description
Failed example:
    prime_gaps = _[1] ; prime_gaps        # optional -- internet
Expected:
    A073490: Number of prime gaps in factorization of n.
Got:
    A073485: Product of any number of consecutive primes; squarefree numbers with no gaps in their prime factorization.
**********************************************************************
2 items had failures:
   4 of  21 in sage.databases.oeis.OEIS
   2 of   5 in sage.databases.oeis.OEIS.find_by_description
    [265 tests, 6 failures, 62.75 s]
----------------------------------------------------------------------
sage -t --long src/sage/databases/oeis.py  # 6 doctests failed
----------------------------------------------------------------------

Change History (4)

comment:1 Changed 2 years ago by vklein

  • Branch set to u/vklein/27783

comment:2 Changed 2 years ago by vklein

  • Authors set to Vincent Klein
  • Commit set to 8542d5078bd965cb475022963ca90d16ff3ffd4d
  • Keywords thursdaysbdx added
  • Status changed from new to needs_review

As the order of the list returned by oeis cannot be predicted, sort the results of the failing doctests.


New commits:

8542d50Trac #27783: Fix oeis doctests failures ...
Last edited 2 years ago by slelievre (previous) (diff)

comment:3 Changed 2 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM.

comment:4 Changed 2 years ago by vbraun

  • Branch changed from u/vklein/27783 to 8542d5078bd965cb475022963ca90d16ff3ffd4d
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.