-
-
Notifications
You must be signed in to change notification settings - Fork 679
Description
Lots and lots of tests fail on Python 3 due to the use of random_elements in tests.
The problem, I've found, is not to do with seeding the RNG. Python's random produces the same sequence with the same seed on Python 2 and 3. However, there is a slight difference in the implementation of random.randint, such that it does produce different values, annoyingly.
I'm not sure how we want to deal with this. In Sage there's a sage.misc.prandom that for some reason provides wrappers around functions from Python's random module. Perhaps one thing we could do is ensure that sage.misc.prandom is always used, and modify its wrapper to randint (actually randrange, which randint is implemented on top of), to provide consistent results.
Component: python3
Author: Erik Bray
Branch/Commit: 4ac044a
Reviewer: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/24508