test/gen_testdata: Use our own PRNG instance
This protects us from ZODB and other third-party code from using global PRNG and thus affecting its state and gen_testdata.py output. Till now we were lucky that there was no such third-party user and so the output of gen_testdata.py remains exactly the same as before hereby patch. But better be robust and avoid even potential possibility of such situations. Using private PRNG will also help later when running gen_testdata.py via Python3 : in py3 they changed behaviour of builtin random and emitted numbers differ from the same random when run under py2. By using our own PRNG we will be able to level-out that and use essentially the same PRNG on both py2 and py3.
Showing
Please register or sign in to comment