class TestSeed(TestCase):

    def test_scalar(self):
        s = np.random.RandomState(0)
assert_equal(s.randint(1000), 684)
s = np.random.RandomState(4294967295)
assert_equal(s.randint(1000), 419)
Python: dangers of temporarily changing the random seed using a context manager?