def test_dmp_content(): assert dmp_content([[-2]], 1, ZZ) == [2] f, g, F = [ZZ(3), ZZ(2), ZZ(1)], [ZZ(1)], [] for i in xrange(0, 5): g = dup_mul(g, f, ZZ) F.insert(0, g) assert dmp_content(F, 1, ZZ) == f assert dmp_one_p(dmp_content(f_4, 2, ZZ), 1, ZZ) assert dmp_one_p(dmp_content(f_5, 2, ZZ), 1, ZZ) assert dmp_one_p(dmp_content(f_6, 3, ZZ), 2, ZZ)
def test_dmp_content(): assert dmp_content([[-2]], 1, ZZ) == [2] f, g, F = [ZZ(3),ZZ(2),ZZ(1)], [ZZ(1)], [] for i in xrange(0, 5): g = dup_mul(g, f, ZZ) F.insert(0, g) assert dmp_content(F, 1, ZZ) == f assert dmp_one_p(dmp_content(f_4, 2, ZZ), 1, ZZ) assert dmp_one_p(dmp_content(f_5, 2, ZZ), 1, ZZ) assert dmp_one_p(dmp_content(f_6, 3, ZZ), 2, ZZ)