MCPcopy
hub / github.com/numpy/numpy / test_invalid_array

Method test_invalid_array

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

assert_raisesFunction · 0.90

Tested by

no test coverage detected