File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11import datetime
22from datetime import timedelta
3- from io import StringIO
3+ from io import StringIO , BytesIO
44import json
55import os
66import sys
@@ -2186,10 +2186,10 @@ def test_read_json_dtype_backend(
21862186 @td .skip_if_no ("pyarrow" )
21872187 def test_read_json_pyarrow_with_dtype (self ):
21882188 dtype = {"a" : "int32[pyarrow]" , "b" : "int64[pyarrow]" }
2189- json = '{"a": 1, "b": 2}'
2189+ json = b '{"a": 1, "b": 2}\n '
21902190
21912191 df = read_json (
2192- StringIO (json ),
2192+ BytesIO (json ),
21932193 dtype = dtype ,
21942194 lines = True ,
21952195 engine = "pyarrow" ,
@@ -2199,8 +2199,7 @@ def test_read_json_pyarrow_with_dtype(self):
21992199 result = df .dtypes
22002200 pa = pytest .importorskip ("pyarrow" )
22012201 expected = Series (
2202- [pd .ArrowDtype (pa .int32 ()), pd .ArrowDtype (pa .int64 ())],
2203- [
2202+ data = [
22042203 pd .ArrowDtype .construct_from_string ("int32[pyarrow]" ),
22052204 pd .ArrowDtype .construct_from_string ("int64[pyarrow]" ),
22062205 ],
You can’t perform that action at this time.
0 commit comments