Commit f48b92d0 authored by Guido van Rossum's avatar Guido van Rossum

Change a test to be more predictable.

The problem with using random.random is that several modules and tests do
"from random in random" which confuses pickle.whichmodule().
parent 080ed09d
......@@ -2050,10 +2050,10 @@ highest protocol among opcodes = 1
Exercise the INST/OBJ/BUILD family.
>>> import random
>>> dis(pickle.dumps(random.random, 0))
0: c GLOBAL 'random random'
15: p PUT 0
18: . STOP
>>> dis(pickle.dumps(random.getrandbits, 0))
0: c GLOBAL 'random getrandbits'
20: p PUT 0
23: . STOP
highest protocol among opcodes = 0
>>> from pickletools import _Example
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment