@@ -94,25 +94,25 @@ def test_showgood():
9494
9595
9696def test_fmpz ():
97- print (1 )
97+ print (1 , flush = True )
9898 assert flint .fmpz () == flint .fmpz (0 )
99- print (2 )
99+ print (2 , flush = True )
100100 L = [0 , 1 , 2 , 3 , 2 ** 31 - 1 , 2 ** 31 , 2 ** 63 - 1 , 2 ** 63 , 2 ** 64 - 1 , 2 ** 64 ]
101101 L += [- x for x in L ]
102102 for i in L :
103- print (3 , i )
103+ print (3 , i , flush = True )
104104 f = flint .fmpz (i )
105105 assert int (f ) == i
106106 assert flint .fmpz (f ) == f
107107 assert flint .fmpz (str (i )) == f
108- print (4 )
108+ print (4 , flush = True )
109109 assert raises (lambda : flint .fmpz (1 ,2 ), TypeError ) # type: ignore
110110 assert raises (lambda : flint .fmpz ("qwe" ), ValueError )
111111 assert raises (lambda : flint .fmpz ([]), TypeError ) # type: ignore
112- print (5 )
112+ print (5 , flush = True )
113113 for s in L :
114114 for t in L :
115- print (6 , s , t )
115+ print (6 , s , t , flush = True )
116116 for ltype in (flint .fmpz , int ):
117117 for rtype in (flint .fmpz , int ):
118118
@@ -148,7 +148,7 @@ def test_fmpz():
148148 assert raises (lambda : ltype (s ) << rtype (t ), ValueError )
149149 assert raises (lambda : ltype (s ) >> rtype (t ), ValueError )
150150
151- print (7 )
151+ print (7 , flush = True )
152152 assert 2 ** flint .fmpz (2 ) == 4
153153 assert type (2 ** flint .fmpz (2 )) == flint .fmpz
154154 assert raises (lambda : () ** flint .fmpz (1 ), TypeError ) # type: ignore
@@ -157,15 +157,15 @@ def test_fmpz():
157157
158158 mega = flint .fmpz (2 ) ** 8000000
159159 assert raises (lambda : mega ** mega , OverflowError )
160- print (8 )
160+ print (8 , flush = True )
161161
162162 pow_mod_examples = [
163163 (2 , 2 , 3 , 1 ),
164164 (2 , - 1 , 5 , 3 ),
165165 (2 , 0 , 5 , 1 ),
166166 (2 , 5 , 1000 , 32 ),
167167 ]
168- print (9 )
168+ print (9 , flush = True )
169169 for a , b , c , ab_mod_c in pow_mod_examples :
170170 assert pow (a , b , c ) == ab_mod_c
171171 assert pow (flint .fmpz (a ), b , c ) == ab_mod_c
@@ -188,7 +188,7 @@ def test_fmpz():
188188 assert raises (lambda : pow (flint .fmpz (2 ), "asd" , 2 ), TypeError ) # type: ignore
189189 assert raises (lambda : pow (flint .fmpz (2 ), 2 , "asd" ), TypeError ) # type: ignore
190190
191- print (10 )
191+ print (10 , flush = True )
192192 f = flint .fmpz (2 )
193193 assert f .numerator == f
194194 assert type (f .numerator ) is flint .fmpz
@@ -240,7 +240,7 @@ def test_fmpz():
240240 f3 = flint .fmpz (3 )
241241 f8 = flint .fmpz (8 )
242242
243- print (11 )
243+ print (11 , flush = True )
244244 assert f2 << 2 == 8
245245 assert f2 << f2 == 8
246246 assert 2 << f2 == 8
@@ -280,7 +280,7 @@ def test_fmpz():
280280 d = {flint .fmpz (2 ): 3 }
281281 d [flint .fmpz (2 )] = - 1
282282
283- print (12 )
283+ print (12 , flush = True )
284284 assert d == {flint .fmpz (2 ): - 1 }
285285 ctx .pretty = False
286286 assert repr (flint .fmpz (0 )) == "fmpz(0)"
@@ -292,7 +292,7 @@ def test_fmpz():
292292 big = flint .fmpz (bigstr )
293293 assert big .str () == bigstr
294294 assert big .str (condense = 10 ) == '1111111111{...80 digits...}1111111111'
295- print (13 )
295+ print (13 , flush = True )
296296
297297def test_fmpz_factor ():
298298 assert flint .fmpz (6 ).gcd (flint .fmpz (9 )) == 3
0 commit comments