Skip to content

Commit d7b06d5

Browse files
committed
BUG: construct path pandas-dev#27135
1 parent b34bc15 commit d7b06d5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pandas/tests/io/json/test_readlines.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from io import StringIO
2-
from pathlib import PureWindowsPath
3-
from platform import system
2+
from pathlib import Path
43

54
import pytest
65

@@ -232,9 +231,7 @@ def test_readjson_lines_chunks_fileurl(datapath):
232231
pd.DataFrame([[5, 6]], columns=["a", "b"], index=[2]),
233232
]
234233
os_path = datapath("io", "json", "data", "line_delimited.json")
235-
file_url = "file://localhost" + os_path
236-
if system() == "Windows":
237-
file_url = PureWindowsPath(file_url)
234+
file_url = Path(os_path).as_uri()
238235
url_reader = pd.read_json(file_url, lines=True, chunksize=1)
239236
for index, chuck in enumerate(url_reader):
240237
tm.assert_frame_equal(chuck, df_list_expected[index])

0 commit comments

Comments
 (0)