15
15
16
16
import pandas ._libs .json as ujson
17
17
from pandas ._libs .tslib import Timestamp
18
- import pandas .compat as compat
18
+ from pandas .compat import IS64 , is_platform_windows
19
19
20
20
from pandas import DataFrame , DatetimeIndex , Index , NaT , Series , Timedelta , date_range
21
21
import pandas ._testing as tm
@@ -53,7 +53,7 @@ def get_int32_compat_dtype(numpy, orient):
53
53
# See GH#32527
54
54
dtype = np .int64
55
55
if not ((numpy is None or orient == "index" ) or (numpy is True and orient is None )):
56
- if compat . is_platform_windows ():
56
+ if is_platform_windows ():
57
57
dtype = np .int32
58
58
else :
59
59
dtype = np .intp
@@ -62,9 +62,7 @@ def get_int32_compat_dtype(numpy, orient):
62
62
63
63
64
64
class TestUltraJSONTests :
65
- @pytest .mark .skipif (
66
- compat .is_platform_32bit (), reason = "not compliant on 32-bit, xref #15865"
67
- )
65
+ @pytest .mark .skipif (not IS64 , reason = "not compliant on 32-bit, xref #15865" )
68
66
def test_encode_decimal (self ):
69
67
sut = decimal .Decimal ("1337.1337" )
70
68
encoded = ujson .encode (sut , double_precision = 15 )
@@ -561,7 +559,7 @@ def test_encode_long_conversion(self):
561
559
assert long_input == ujson .decode (output )
562
560
563
561
@pytest .mark .parametrize ("bigNum" , [sys .maxsize + 1 , - (sys .maxsize + 2 )])
564
- @pytest .mark .xfail (not compat . IS64 , reason = "GH-35288" )
562
+ @pytest .mark .xfail (not IS64 , reason = "GH-35288" )
565
563
def test_dumps_ints_larger_than_maxsize (self , bigNum ):
566
564
# GH34395
567
565
bigNum = sys .maxsize + 1
@@ -703,7 +701,7 @@ def test_int_array(self, any_int_dtype):
703
701
tm .assert_numpy_array_equal (arr_input , arr_output )
704
702
705
703
def test_int_max (self , any_int_dtype ):
706
- if any_int_dtype in ("int64" , "uint64" ) and compat . is_platform_32bit () :
704
+ if any_int_dtype in ("int64" , "uint64" ) and not IS64 :
707
705
pytest .skip ("Cannot test 64-bit integer on 32-bit platform" )
708
706
709
707
klass = np .dtype (any_int_dtype ).type
0 commit comments