sagemath / sage

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

1 optional internet oeis doctest failing (busy beaver ordering) #29787

Closed seblabbe closed 4 years ago

seblabbe commented 4 years ago

With SageMath version 9.2.beta0, Release Date: 2020-05-28

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

gives:

sage -t --long src/sage/databases/oeis.py
**********************************************************************
File "src/sage/databases/oeis.py", line 489, in sage.databases.oeis.OEIS.find_by_description
Failed example:
    oeis('beaver', max_results=4, first_result=2)     # optional -- internet
Expected:
    0: A131956: Busy Beaver variation: maximum number of steps for ...
    1: A141475: Number of Turing machines with n states following ...
    2: A131957: Busy Beaver sigma variation: maximum number of 1's ...
    3: A...: ...
Got:
    0: A131956: Busy Beaver variation: maximum number of steps for a 2-state, 2-symbol Turing machine running on a tape which is initialized with the number n in binary and 0's everywhere else. The machine is started at the rightmost bit in the number n.
    1: A141475: Number of Turing machines with n states following the standard formalism of the busy beaver problem where the head of a Turing machine either moves to the right or to the left, but none once halted.
    2: A333479: Busy Beaver for binary lambda calculus: the maximum normal form size of any closed lambda term of size n, or 0 if no closed term of size n exists.
    3: A131957: Busy Beaver sigma variation: maximum number of 1's on the final tape, for a 2-state, 2-symbol Turing machine running on a tape which is initialized with the number n in binary and 0's everywhere else. The machine is started at the rightmost bit in the number n.
**********************************************************************
1 item had failures:
   1 of   5 in sage.databases.oeis.OEIS.find_by_description
    5 webbrowser tests not run
    0 tests not run because we ran out of time
    [281 tests, 1 failure, 34.75 s]

Component: doctest coverage

Author: Frédéric Chapoton

Branch/Commit: cf800be

Reviewer: Travis Scrimshaw

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

fchapoton commented 4 years ago
comment:1

oh, damn, these doctests should be marked random once and for all...

fchapoton commented 4 years ago

Author: Frédéric Chapoton

fchapoton commented 4 years ago

Branch: u/chapoton/29787

fchapoton commented 4 years ago
comment:2

done, please review!


New commits:

b95fa2cannihilate the oeis specific and ever-changing results
fchapoton commented 4 years ago

Commit: b95fa2c

fchapoton commented 4 years ago
comment:3

green bot, please review

tscrim commented 4 years ago
comment:4

How about we also include in the test that the word Beaver appears and similar for the others?

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from b95fa2c to cf800be

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

cf800bestill test something in the oeis ever-changing doctests
fchapoton commented 4 years ago
comment:6

Here you go

so much energy in so bad doctests..

tscrim commented 4 years ago
comment:7

Thanks. That way it at least it is testing that we are getting the right word in the result. Hopefully this will end this issue.

tscrim commented 4 years ago

Reviewer: Travis Scrimshaw

vbraun commented 4 years ago

Changed branch from u/chapoton/29787 to cf800be