Fix transform_path_to_dotted tests on Windows
Convert paths to normalized absolute ones in transform_path_to_dotted tests.
This commit is contained in:
1 parent
92a8a84ff2
commit
77a7792afc
2 files changed
+5
-1
No files matched your search
@@ -200,7 +200,8 @@ def transform_path_to_dotted(sys_path, module_path):
|
||||
"""
|
||||
Returns the dotted path inside a sys.path as a list of names. e.g.
|
||||
|
||||
>>> transform_path_to_dotted(["/foo"], '/foo/bar/baz.py')
|
||||
>>> from os.path import abspath
|
||||
>>> transform_path_to_dotted([abspath("/foo")], abspath('/foo/bar/baz.py'))
|
||||
['bar', 'baz']
|
||||
|
||||
Returns None if the path doesn't really resolve to anything.
|
||||
|
||||
Reference in new issue
Block a user