File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 2323
2424import json
2525import os
26+ import pathlib
27+ import sys
2628import unittest
2729import doctest
2830from pprint import pprint
@@ -143,7 +145,11 @@ def setUpWithCrateLayer(test):
143145 cursor .execute (stmt )
144146 assert cursor .fetchall ()[0 ][0 ] == 1
145147
148+ # Compute path to file for data loading.
146149 data_path = docs_path ('testing/testdata/data/test_a.json' )
150+ if sys .platform == 'win32' :
151+ data_path = pathlib .PureWindowsPath (data_path ).as_uri ()
152+
147153 # load testing data into crate
148154 cursor .execute ("copy locations from ?" , (data_path ,))
149155 # refresh location table so imported data is visible immediately
Original file line number Diff line number Diff line change 2121# software solely pursuant to the terms of the relevant commercial agreement.
2222
2323import os
24- import pathlib
25- import sys
2624import unittest
2725import doctest
2826import tempfile
@@ -35,8 +33,6 @@ def docs_path(*parts):
3533 os .path .dirname (os .path .dirname (__file__ )), * parts
3634 )
3735 )
38- if sys .platform == 'win32' :
39- path = pathlib .PureWindowsPath (path ).as_uri ()
4036 return path
4137
4238
You can’t perform that action at this time.
0 commit comments