diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2019-06-25 18:53:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-25 18:53:19 -0700 |
commit | 4668b46310e74b2f3c78eb213b6d796456278942 (patch) | |
tree | 54dd9429e67a132ec84a3d8b97ad1aa2f400a4ef /numpy/random/tests/test_randomstate.py | |
parent | b0967003af6f6e6fae075791d634deeb7e58b2f4 (diff) | |
parent | 8a0c54ac0442dd1bf7d60f3ea5e2c578ae71959f (diff) | |
download | numpy-4668b46310e74b2f3c78eb213b6d796456278942.tar.gz |
Merge pull request #13780 from mattip/seedsequence
ENH: use SeedSequence instead of seed()
Diffstat (limited to 'numpy/random/tests/test_randomstate.py')
-rw-r--r-- | numpy/random/tests/test_randomstate.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/numpy/random/tests/test_randomstate.py b/numpy/random/tests/test_randomstate.py index 4acdff114..3b5a279a3 100644 --- a/numpy/random/tests/test_randomstate.py +++ b/numpy/random/tests/test_randomstate.py @@ -98,11 +98,10 @@ class TestSeed(object): assert_raises(ValueError, random.RandomState, [[1, 2, 3], [4, 5, 6]]) - def test_seed_equivalency(self): - rs = random.RandomState(0) - rs2 = random.RandomState(MT19937(0)) - assert_mt19937_state_equal(rs.get_state(legacy=False), - rs2.get_state(legacy=False)) + def test_cannot_seed(self): + rs = random.RandomState(PCG64(0)) + with assert_raises(TypeError): + rs.seed(1234) def test_invalid_initialization(self): assert_raises(ValueError, random.RandomState, MT19937) |