File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 23
23
24
24
import json
25
25
import os
26
+ import pathlib
27
+ import sys
26
28
import unittest
27
29
import doctest
28
30
from pprint import pprint
@@ -143,7 +145,11 @@ def setUpWithCrateLayer(test):
143
145
cursor .execute (stmt )
144
146
assert cursor .fetchall ()[0 ][0 ] == 1
145
147
148
+ # Compute path to file for data loading.
146
149
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
+
147
153
# load testing data into crate
148
154
cursor .execute ("copy locations from ?" , (data_path ,))
149
155
# refresh location table so imported data is visible immediately
Original file line number Diff line number Diff line change 21
21
# software solely pursuant to the terms of the relevant commercial agreement.
22
22
23
23
import os
24
- import pathlib
25
- import sys
26
24
import unittest
27
25
import doctest
28
26
import tempfile
@@ -35,8 +33,6 @@ def docs_path(*parts):
35
33
os .path .dirname (os .path .dirname (__file__ )), * parts
36
34
)
37
35
)
38
- if sys .platform == 'win32' :
39
- path = pathlib .PureWindowsPath (path ).as_uri ()
40
36
return path
41
37
42
38
You can’t perform that action at this time.
0 commit comments