sagemath / sage

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

Make interfaces doctests ready for random seeds #29967

Closed kliem closed 3 years ago

kliem commented 4 years ago

This ticket makes

sage -t --long --random-seed=n src/sage/interfaces/

pass for different values n than just 0.

CC: @DaveWitteMorris

Component: doctest framework

Author: Jonathan Kliem

Branch/Commit: fd09637

Reviewer: Dave Morris

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

kliem commented 4 years ago
comment:1

Probably only

sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/interfaces/singular.py  # 3 doctests failed

needs to be fixed.

kliem commented 4 years ago

Dependencies: #29962

kliem commented 3 years ago
comment:4
sage -t --long --random-seed=1232131238098 src/sage/interfaces/r.py
too many failed tests, not using stored timings
Running doctests with ID 2021-01-24-13-31-27-fe6ffc5b.
Git branch: develop
Using --optional=4ti2,build,debian,dochtml,e_antic,latte_int,libnauty,lidia,lrslib,mcqd,memlimit,normaliz,pip,pynormaliz,pyroaringbitmap,python_igraph,rubiks,sage,sage_spkg,speaklater,texttable
Doctesting 1 file.
R[write to console]: Warning messages:

R[write to console]: 1: 
R[write to console]: In sage10 + sage6 :
R[write to console]: 

R[write to console]:  longer object length is not a multiple of shorter object length

R[write to console]: 2: 
R[write to console]: In sqrt(sage10) :
R[write to console]:  NaNs produced

R[write to console]: 3: 
R[write to console]: In sqrt(sage4) :
R[write to console]:  NaNs produced

sage -t --long --random-seed=1232131238098 src/sage/interfaces/r.py
    [257 tests, 2.53 s]
kliem commented 3 years ago
comment:5

Replying to @kliem:

sage -t --long --random-seed=1232131238098 src/sage/interfaces/r.py
too many failed tests, not using stored timings
Running doctests with ID 2021-01-24-13-31-27-fe6ffc5b.
Git branch: develop
Using --optional=4ti2,build,debian,dochtml,e_antic,latte_int,libnauty,lidia,lrslib,mcqd,memlimit,normaliz,pip,pynormaliz,pyroaringbitmap,python_igraph,rubiks,sage,sage_spkg,speaklater,texttable
Doctesting 1 file.
R[write to console]: Warning messages:

R[write to console]: 1: 
R[write to console]: In sage10 + sage6 :
R[write to console]: 

R[write to console]:  longer object length is not a multiple of shorter object length

R[write to console]: 2: 
R[write to console]: In sqrt(sage10) :
R[write to console]:  NaNs produced

R[write to console]: 3: 
R[write to console]: In sqrt(sage4) :
R[write to console]:  NaNs produced

sage -t --long --random-seed=1232131238098 src/sage/interfaces/r.py
    [257 tests, 2.53 s]

I'm just going to ignore this warning. Technically, it is not a failed doctest.

kliem commented 3 years ago

Author: Jonathan Kliem

kliem commented 3 years ago

Changed dependencies from #29962 to none

kliem commented 3 years ago

Commit: fd09637

kliem commented 3 years ago

Branch: public/29967

kliem commented 3 years ago

New commits:

fd09637Make interfaces doctests ready for random seeds
DaveWitteMorris commented 3 years ago
comment:7

Thanks for fixing this. I tried twenty different seeds and got no doctest failures.

I don't think the warnings from r.py have anything to do with this ticket, and they are certainly not a reason to keep this ticket open. (I get them even with random-seed=0.) I opened ticket #31300 for anyone who is concerned about those warnings.

DaveWitteMorris commented 3 years ago

Reviewer: Dave Morris

kliem commented 3 years ago
comment:8

Thank you.

vbraun commented 3 years ago

Changed branch from public/29967 to fd09637