File tree 1 file changed +8
-2
lines changed 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,10 @@ def cant_convert(v):
300
300
assert noconvert (7 ) == 7
301
301
cant_convert (3.14159 )
302
302
# TODO: Avoid DeprecationWarning in `PyLong_AsLong` (and similar)
303
- with pytest .deprecated_call ():
303
+ if env .PY >= (3 , 8 ):
304
+ with pytest .deprecated_call ():
305
+ assert convert (Int ()) == 42
306
+ else :
304
307
assert convert (Int ()) == 42
305
308
requires_conversion (Int ())
306
309
cant_convert (NotInt ())
@@ -332,7 +335,10 @@ def require_implicit(v):
332
335
333
336
# The implicit conversion from np.float32 is undesirable but currently accepted.
334
337
# TODO: Avoid DeprecationWarning in `PyLong_AsLong` (and similar)
335
- with pytest .deprecated_call ():
338
+ if env .PY >= (3 , 8 ):
339
+ with pytest .deprecated_call ():
340
+ assert convert (np .float32 (3.14159 )) == 3
341
+ else :
336
342
assert convert (np .float32 (3.14159 )) == 3
337
343
require_implicit (np .float32 (3.14159 ))
338
344
You can’t perform that action at this time.
0 commit comments