Skip to content

Commit 80d2c0e

Browse files
committed
print
1 parent 83fbe25 commit 80d2c0e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/flint/test/test_all.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,25 @@ def test_showgood():
9494

9595

9696
def test_fmpz():
97+
print(1)
9798
assert flint.fmpz() == flint.fmpz(0)
99+
print(2)
98100
L = [0, 1, 2, 3, 2**31-1, 2**31, 2**63-1, 2**63, 2**64-1, 2**64]
99101
L += [-x for x in L]
100102
for i in L:
103+
print(3, i)
101104
f = flint.fmpz(i)
102105
assert int(f) == i
103106
assert flint.fmpz(f) == f
104107
assert flint.fmpz(str(i)) == f
108+
print(4)
105109
assert raises(lambda: flint.fmpz(1,2), TypeError) # type: ignore
106110
assert raises(lambda: flint.fmpz("qwe"), ValueError)
107111
assert raises(lambda: flint.fmpz([]), TypeError) # type: ignore
112+
print(5)
108113
for s in L:
109114
for t in L:
115+
print(6, s, t)
110116
for ltype in (flint.fmpz, int):
111117
for rtype in (flint.fmpz, int):
112118

@@ -142,6 +148,7 @@ def test_fmpz():
142148
assert raises(lambda: ltype(s) << rtype(t), ValueError)
143149
assert raises(lambda: ltype(s) >> rtype(t), ValueError)
144150

151+
print(7)
145152
assert 2 ** flint.fmpz(2) == 4
146153
assert type(2 ** flint.fmpz(2)) == flint.fmpz
147154
assert raises(lambda: () ** flint.fmpz(1), TypeError) # type: ignore
@@ -150,13 +157,15 @@ def test_fmpz():
150157

151158
mega = flint.fmpz(2) ** 8000000
152159
assert raises(lambda: mega ** mega, OverflowError)
160+
print(8)
153161

154162
pow_mod_examples = [
155163
(2, 2, 3, 1),
156164
(2, -1, 5, 3),
157165
(2, 0, 5, 1),
158166
(2, 5, 1000, 32),
159167
]
168+
print(9)
160169
for a, b, c, ab_mod_c in pow_mod_examples:
161170
assert pow(a, b, c) == ab_mod_c
162171
assert pow(flint.fmpz(a), b, c) == ab_mod_c
@@ -179,6 +188,7 @@ def test_fmpz():
179188
assert raises(lambda: pow(flint.fmpz(2), "asd", 2), TypeError) # type: ignore
180189
assert raises(lambda: pow(flint.fmpz(2), 2, "asd"), TypeError) # type: ignore
181190

191+
print(10)
182192
f = flint.fmpz(2)
183193
assert f.numerator == f
184194
assert type(f.numerator) is flint.fmpz
@@ -230,6 +240,7 @@ def test_fmpz():
230240
f3 = flint.fmpz(3)
231241
f8 = flint.fmpz(8)
232242

243+
print(11)
233244
assert f2 << 2 == 8
234245
assert f2 << f2 == 8
235246
assert 2 << f2 == 8
@@ -269,6 +280,7 @@ def test_fmpz():
269280
d = {flint.fmpz(2): 3}
270281
d[flint.fmpz(2)] = -1
271282

283+
print(12)
272284
assert d == {flint.fmpz(2): -1}
273285
ctx.pretty = False
274286
assert repr(flint.fmpz(0)) == "fmpz(0)"
@@ -280,6 +292,7 @@ def test_fmpz():
280292
big = flint.fmpz(bigstr)
281293
assert big.str() == bigstr
282294
assert big.str(condense=10) == '1111111111{...80 digits...}1111111111'
295+
print(13)
283296

284297
def test_fmpz_factor():
285298
assert flint.fmpz(6).gcd(flint.fmpz(9)) == 3

0 commit comments

Comments
 (0)