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

Function test_sub_128

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

Source from the content-addressed store, hash-verified

127
128
129def test_sub_128():
130 with exc_iter(INT128_VALUES, INT128_VALUES) as it:
131 for a, b in it:
132 c = a - b
133 if not (INT128_MIN <= c <= INT128_MAX):
134 assert_raises(OverflowError, mt.extint_sub_128, a, b)
135 else:
136 d = mt.extint_sub_128(a, b)
137 if c != d:
138 assert_equal(d, c)
139
140
141def test_neg_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