22
33import sys
44
5- PY2 = sys .version_info [0 ] < 3
6-
75from io import BytesIO
86from itertools import product
97from functools import partial
@@ -250,9 +248,6 @@ def test_threshold_heuristic():
250248 assert_equal (threshold_heuristic (1 , 9 , 1 , skip_thresh = 7 ), None )
251249 assert_equal (threshold_heuristic (1 , 9 , 2 , skip_thresh = 16 ), 'full' )
252250 assert_equal (threshold_heuristic (1 , 9 , 2 , skip_thresh = 15 ), None )
253- # long if on Python 2
254- if PY2 :
255- assert_equal (threshold_heuristic (long (1 ), 9 , 1 , skip_thresh = 8 ), 'full' )
256251 # full slice, smallest step size
257252 assert_equal (threshold_heuristic (
258253 slice (0 , 9 , 1 ), 9 , 2 , skip_thresh = 2 ),
@@ -515,10 +510,6 @@ def test_optimize_read_slicers():
515510 assert_equal (optimize_read_slicers (
516511 (1 , 2 , 3 ), (2 , 3 , 4 ), 4 , _always ),
517512 ((sn , sn , 3 ), (1 , 2 )))
518- if PY2 : # Check we can pass in longs as well
519- assert_equal (optimize_read_slicers (
520- (long (1 ), long (2 ), long (3 )), (2 , 3 , 4 ), 4 , _always ),
521- ((sn , sn , 3 ), (1 , 2 )))
522513
523514
524515def test_slicers2segments ():
@@ -540,10 +531,6 @@ def test_slicers2segments():
540531 assert_equal (slicers2segments (
541532 (slice (None ), slice (None ), 2 ), (10 , 6 , 4 ), 7 , 4 ),
542533 [[7 + 10 * 6 * 2 * 4 , 10 * 6 * 4 ]])
543- if PY2 : # Check we can pass longs on Python 2
544- assert_equal (
545- slicers2segments ((long (0 ), long (1 ), long (2 )), (10 , 6 , 4 ), 7 , 4 ),
546- [[7 + 10 * 4 + 10 * 6 * 2 * 4 , 4 ]])
547534
548535
549536def test_calc_slicedefs ():
0 commit comments