Opened 18 months ago
Closed 11 months ago
#29973 closed enhancement (fixed)
Make sets doctests ready for random seeds
Reported by:  ghkliem  Owned by:  

Priority:  major  Milestone:  sage9.3 
Component:  doctest framework  Keywords:  
Cc:  Merged in:  
Authors:  Dave Morris  Reviewers:  Jonathan Kliem 
Report Upstream:  N/A  Work issues:  
Branch:  aae7813 (Commits, GitHub, GitLab)  Commit:  aae78139c7a229087872b014875ce9380f34bacf 
Dependencies:  #29962  Stopgaps: 
Description
This ticket makes
sage t long randomseed=n src/sage/sets/
pass for different values n
than just 0
.
Change History (9)
comment:1 Changed 18 months ago by
 Dependencies set to #29962
comment:2 Changed 15 months ago by
 Milestone changed from sage9.2 to sage9.3
comment:3 Changed 12 months ago by
 Branch set to public/29973
comment:4 Changed 12 months ago by
 Commit set to aae78139c7a229087872b014875ce9380f34bacf
 Status changed from new to needs_review
I added a # random
tag to the example that failed in comment:1 (and also added a basic doctest S.random_element() in S
to the random_element()
method of FiniteEnumeratedSet
). I tried a few various seeds and have not seen any other doctest failures.
New commits:
aae7813  trac 29973 random enumerated sets

comment:5 Changed 12 months ago by
After submitting the PR, I noticed that #29935 suggests S.random_element().parent() is S
as a doctest, but I don't think that will work here:
sage: S = FiniteEnumeratedSet([1,2,3]) sage: a = S.random_element() sage: a 2 sage: a.parent() Integer Ring sage: S.random_element().parent() is S False
comment:6 Changed 12 months ago by
 Reviewers set to Jonathan Kliem
 Status changed from needs_review to positive_review
Thank you. I think it is fine.
comment:7 Changed 12 months ago by
I think it is important to implement fuzzing of the doctests, so I will try to look at some of the other tickets in #29935 too. Thanks very much for your extensive work on this project!! (and thank you for the review of this ticket)
comment:8 Changed 12 months ago by
Thanks.
Well there is #29954, which is pretty annoying and made me slow down a bit. This needs to be taken care of.
comment:9 Changed 11 months ago by
 Branch changed from public/29973 to aae78139c7a229087872b014875ce9380f34bacf
 Resolution set to fixed
 Status changed from positive_review to closed
At least the following needs to be fixed: