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

Method test_invalid_array

numpy/random/tests/test_randomstate.py:94–100  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

92 assert_raises(ValueError, random.RandomState, -1)
93
94 def test_invalid_array(self):
95 # seed must be an unsigned 32 bit integer
96 assert_raises(TypeError, random.RandomState, [-0.5])
97 assert_raises(ValueError, random.RandomState, [-1])
98 assert_raises(ValueError, random.RandomState, [4294967296])
99 assert_raises(ValueError, random.RandomState, [1, 2, 4294967296])
100 assert_raises(ValueError, random.RandomState, [1, -2, 4294967296])
101
102 def test_invalid_array_shape(self):
103 # gh-9832

Callers

nothing calls this directly

Calls 1

assert_raisesFunction · 0.90

Tested by

no test coverage detected