Skip to content

Commit 09b6764

Browse files
Generic unit tests for mul_low and pow_trunc
1 parent adaa17a commit 09b6764

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/flint/test/test_all.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2964,6 +2964,11 @@ def setbad(obj, i, val):
29642964
assert raises(lambda: P([1, 1]) ** -1, DomainError)
29652965
assert raises(lambda: P([1, 1]) ** None, TypeError) # type: ignore
29662966

2967+
# Truncated operations
2968+
assert P([1, 2, 3]).mul_low(P([4, 5, 6]), 3) == P([4, 13, 28])
2969+
assert raises(lambda: P([1, 2, 3]).mul_low(None, 3), TypeError) # type: ignore
2970+
assert raises(lambda: P([1, 2, 3]).mul_low(P([4, 5, 6]), None), TypeError) # type: ignore
2971+
29672972
# XXX: Not sure what this should do in general:
29682973
p = P([1, 1])
29692974
mod = P([1, 1])

0 commit comments

Comments
 (0)