Skip to content

Commit 8d81717

Browse files
committed
normalize get_data paths
1 parent 8b85f34 commit 8d81717

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/util.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import distutils.spawn # pylint: disable=no-name-in-module,import-error
44
import functools
55
import os
6+
from typing import Text
67

78
import pytest
89
from pkg_resources import (Requirement, ResolutionError, # type: ignore
@@ -11,6 +12,7 @@
1112
from cwltool.factory import Factory
1213
from cwltool.utils import onWindows, windows_default_container_id
1314
from cwltool.context import RuntimeContext, LoadingContext
15+
from cwltool.resolver import Path
1416

1517
def get_windows_safe_factory(runtime_context=None, # type: RuntimeContext
1618
loading_context=None, # type: LoadingContext
@@ -39,10 +41,7 @@ def get_data(filename):
3941
pass
4042
if not filepath or not os.path.isfile(filepath):
4143
filepath = os.path.join(os.path.dirname(__file__), os.pardir, filename)
42-
# warning, __file__ is all lowercase on Windows systems, this can
43-
# sometimes conflict with docker toolkit. Workaround: pip install .
44-
# and run the tests elsewhere via python -m pytest --pyarg cwltool
45-
return filepath
44+
return Text(Path(filepath).resolve())
4645

4746

4847
needs_docker = pytest.mark.skipif(not bool(distutils.spawn.find_executable('docker')),

0 commit comments

Comments
 (0)