File tree Expand file tree Collapse file tree 4 files changed +56
-0
lines changed Expand file tree Collapse file tree 4 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -281,3 +281,17 @@ def test_greater_mixed_integer_kinds():
281
281
# Python scalar
282
282
assert dpt .all (dpt .greater (x2 , - 1 ))
283
283
assert not dpt .any (dpt .greater (- 1 , x2 ))
284
+
285
+
286
+ def test_greater_very_large_py_int ():
287
+ get_queue_or_skip ()
288
+
289
+ py_int = dpt .iinfo (dpt .int64 ).max + 10
290
+
291
+ x = dpt .asarray (3 , dtype = "u8" )
292
+ assert py_int > x
293
+ assert not dpt .greater (x , py_int )
294
+
295
+ x = dpt .asarray (py_int , dtype = "u8" )
296
+ assert x > - 1
297
+ assert not dpt .greater (- 1 , x )
Original file line number Diff line number Diff line change @@ -280,3 +280,17 @@ def test_greater_equal_mixed_integer_kinds():
280
280
# Python scalar
281
281
assert dpt .all (dpt .greater_equal (x2 , - 1 ))
282
282
assert not dpt .any (dpt .greater_equal (- 1 , x2 ))
283
+
284
+
285
+ def test_greater_equal_very_large_py_int ():
286
+ get_queue_or_skip ()
287
+
288
+ py_int = dpt .iinfo (dpt .int64 ).max + 10
289
+
290
+ x = dpt .asarray (3 , dtype = "u8" )
291
+ assert py_int >= x
292
+ assert not dpt .greater_equal (x , py_int )
293
+
294
+ x = dpt .asarray (py_int , dtype = "u8" )
295
+ assert x >= - 1
296
+ assert not dpt .greater_equal (- 1 , x )
Original file line number Diff line number Diff line change @@ -281,3 +281,17 @@ def test_less_mixed_integer_kinds():
281
281
# Python scalar
282
282
assert not dpt .any (dpt .less (x2 , - 1 ))
283
283
assert dpt .all (dpt .less (- 1 , x2 ))
284
+
285
+
286
+ def test_less_very_large_py_int ():
287
+ get_queue_or_skip ()
288
+
289
+ py_int = dpt .iinfo (dpt .int64 ).max + 10
290
+
291
+ x = dpt .asarray (3 , dtype = "u8" )
292
+ assert not py_int < x
293
+ assert dpt .less (x , py_int )
294
+
295
+ x = dpt .asarray (py_int , dtype = "u8" )
296
+ assert not x < - 1
297
+ assert dpt .less (- 1 , x )
Original file line number Diff line number Diff line change @@ -280,3 +280,17 @@ def test_less_equal_mixed_integer_kinds():
280
280
# Python scalar
281
281
assert not dpt .any (dpt .less_equal (x2 , - 1 ))
282
282
assert dpt .all (dpt .less_equal (- 1 , x2 ))
283
+
284
+
285
+ def test_less_equal_very_large_py_int ():
286
+ get_queue_or_skip ()
287
+
288
+ py_int = dpt .iinfo (dpt .int64 ).max + 10
289
+
290
+ x = dpt .asarray (3 , dtype = "u8" )
291
+ assert not py_int <= x
292
+ assert dpt .less_equal (x , py_int )
293
+
294
+ x = dpt .asarray (py_int , dtype = "u8" )
295
+ assert not x <= - 1
296
+ assert dpt .less_equal (- 1 , x )
You can’t perform that action at this time.
0 commit comments