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

Method test_lengths

numpy/core/tests/test_numeric.py:1197–1204  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1195 assert_(af.dtype == np.dtype(float))
1196
1197 def test_lengths(self):
1198 expected = np.array(list(self.makegen()))
1199 a = np.fromiter(self.makegen(), int)
1200 a20 = np.fromiter(self.makegen(), int, 20)
1201 assert_(len(a) == len(expected))
1202 assert_(len(a20) == 20)
1203 assert_raises(ValueError, np.fromiter,
1204 self.makegen(), int, len(expected) + 10)
1205
1206 def test_values(self):
1207 expected = np.array(list(self.makegen()))

Callers

nothing calls this directly

Calls 3

makegenMethod · 0.95
assert_Function · 0.90
assert_raisesFunction · 0.90

Tested by

no test coverage detected