Skip to content

Commit a707524

Browse files
tests/test_release.py: avoid error from os.path.relpath() on windows.
os.path.relpath() fails on Windows if path is on different drive.
1 parent aef5d64 commit a707524

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_release.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
import sys
66

77

8-
g_root = os.path.normpath(f'{__file__}/../../')
9-
g_root = os.path.relpath(g_root)
8+
g_root_abs = os.path.normpath(f'{__file__}/../../')
109

11-
sys.path.insert(0, g_root)
10+
sys.path.insert(0, g_root_abs)
1211
try:
12+
import pipcl
1313
import setup
1414
finally:
1515
del sys.path[0]
1616

17+
g_root = pipcl.relpath(g_root_abs)
18+
1719

1820
def _file_line(path, text, re_match, offset=+2):
1921
'''

0 commit comments

Comments
 (0)