Skip to content

Commit

Permalink
modify test for generic poly
Browse files Browse the repository at this point in the history
  • Loading branch information
GiacomoPope committed Aug 6, 2024
1 parent 462318e commit e3c9d03
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/flint/test/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -2664,8 +2664,12 @@ def setbad(obj, i, val):
assert raises(lambda: P([1, 1]) ** None, TypeError)

# XXX: Not sure what this should do in general:
# TODO: this now fails as fmpz_mod_poly allows modulus
# assert raises(lambda: pow(P([1, 1]), 2, 3), NotImplementedError)
p = P([1, 1])
mod = P([1, 1])
if type(p) not in [flint.fmpz_mod_poly, flint.nmod_poly]:
assert raises(lambda: pow(p, 2, mod), NotImplementedError)
else:
assert p * p % mod == pow(p, 2, mod)

assert P([1, 2, 1]).gcd(P([1, 1])) == P([1, 1])
assert raises(lambda: P([1, 2, 1]).gcd(None), TypeError)
Expand Down

0 comments on commit e3c9d03

Please sign in to comment.