Skip to content

Commit 6c42e21

Browse files
committed
issue2551334 - get test suite running under windows
Support windows filepaths in tests.
1 parent 0853417 commit 6c42e21

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_misc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ def test_pt_html(self):
209209
<p>&nbsp;</p>"""
210210

211211
# allow file directory prefix and line number to change
212-
p = re.sub(r'(File ")/.*/(test/test_misc.py",)', r'\1XX/\2', p)
212+
p = re.sub(r'\\',r'/', p) # support windows \ => /
213+
# [A-Z]?:? optional drive spec on windows
214+
p = re.sub(r'(File ")[A-Z]?:?/.*/(test/test_misc.py",)', r'\1XX/\2', p)
213215
p = re.sub(r'(", line )\d*,', r'\1XX,', p)
214216

215217
print(p)

0 commit comments

Comments
 (0)