Skip to content

Commit 4783444

Browse files
committed
Test for Windows raw-string paths
Relates to #10
1 parent 70ed32d commit 4783444

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/test_pathtools.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,23 @@ def test_parse_path_windows():
4343
assert parsed['dname'] == 'foo'
4444

4545

46+
def test_parse_path_windows_newline():
47+
path = r'C:\Temp\new\file.ext'
48+
parsed = parse_path(path)
49+
50+
assert parsed == {
51+
'dname': 'new',
52+
'ext': '.ext',
53+
'fname': 'file.ext',
54+
'full': 'C:/Temp/new/file.ext',
55+
'basename': 'file',
56+
'orig': 'C:\\Temp\\new\\file.ext',
57+
'parent': 'C:/Temp',
58+
'path': 'C:/Temp/new/',
59+
}
60+
61+
62+
4663
def test_parse_path_windows_tabs_and_lines():
4764
r"""Test non-raw string containing newline \n and tab \t sequences."""
4865
path = "C:\new_folder\test"

0 commit comments

Comments
 (0)