(self)
| 263 | assert_raises(ValueError, random_state.set_state, state) |
| 264 | |
| 265 | def test_pickle(self): |
| 266 | random_state, _ = self._create_state() |
| 267 | random_state.seed(0) |
| 268 | random_state.random_sample(100) |
| 269 | random_state.standard_normal() |
| 270 | pickled = random_state.get_state(legacy=False) |
| 271 | assert_equal(pickled['has_gauss'], 1) |
| 272 | rs_unpick = pickle.loads(pickle.dumps(random_state)) |
| 273 | unpickled = rs_unpick.get_state(legacy=False) |
| 274 | assert_mt19937_state_equal(pickled, unpickled) |
| 275 | |
| 276 | def test_state_setting(self): |
| 277 | random_state, state = self._create_state() |
nothing calls this directly
no test coverage detected