MCPcopy Create free account
hub / github.com/numpy/numpy / test_pickle

Method test_pickle

numpy/random/tests/test_smoke.py:434–445  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

432 assert_(s.shape == (20, 3))
433
434 def test_pickle(self):
435 pick = pickle.dumps(self.rg)
436 unpick = pickle.loads(pick)
437 assert_((type(self.rg) == type(unpick)))
438 assert_(comp_state(self.rg.bit_generator.state,
439 unpick.bit_generator.state))
440
441 pick = pickle.dumps(self.rg)
442 unpick = pickle.loads(pick)
443 assert_((type(self.rg) == type(unpick)))
444 assert_(comp_state(self.rg.bit_generator.state,
445 unpick.bit_generator.state))
446
447 def test_seed_array(self):
448 if self.seed_vector_bits is None:

Callers

nothing calls this directly

Calls 2

assert_Function · 0.90
comp_stateFunction · 0.85

Tested by

no test coverage detected