MCPcopy Index your code
hub / github.com/numpy/numpy / test_dunder_round

Method test_dunder_round

numpy/_core/tests/test_numeric.py:239–246  ·  view source on GitHub ↗
(self, dtype)

Source from the content-addressed store, hash-verified

237 np.float16, np.float32, np.float64,
238 ])
239 def test_dunder_round(self, dtype):
240 s = dtype(1)
241 assert_(isinstance(round(s), int))
242 assert_(isinstance(round(s, None), int))
243 assert_(isinstance(round(s, ndigits=None), int))
244 assert_equal(round(s), 1)
245 assert_equal(round(s, None), 1)
246 assert_equal(round(s, ndigits=None), 1)
247
248 @pytest.mark.parametrize('val, ndigits', [
249 pytest.param(2**31 - 1, -1,

Callers

nothing calls this directly

Calls 4

assert_Function · 0.90
assert_equalFunction · 0.90
dtypeFunction · 0.85
roundFunction · 0.50

Tested by

no test coverage detected