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

Function test_add_128

numpy/core/tests/test_extint128.py:117–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115
116
117def test_add_128():
118 with exc_iter(INT128_VALUES, INT128_VALUES) as it:
119 for a, b in it:
120 c = a + b
121 if not (INT128_MIN <= c <= INT128_MAX):
122 assert_raises(OverflowError, mt.extint_add_128, a, b)
123 else:
124 d = mt.extint_add_128(a, b)
125 if c != d:
126 assert_equal(d, c)
127
128
129def test_sub_128():

Callers

nothing calls this directly

Calls 3

assert_raisesFunction · 0.90
assert_equalFunction · 0.90
exc_iterFunction · 0.85

Tested by

no test coverage detected