diff tests/pathutil.py @ 286:a2d283d1033d

tests: Fixes for running on Windows. Mostly about those damn backslashes, as usual.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 04 Mar 2015 22:40:50 -0800
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/pathutil.py	Wed Mar 04 22:40:50 2015 -0800
@@ -0,0 +1,13 @@
+import os
+
+
+def slashfix(path):
+    if path is None:
+        return None
+    if isinstance(path, str):
+        return path.replace('/', os.sep)
+    fixed = []
+    for p in path:
+        fixed.append(p.replace('/', os.sep))
+    return fixed
+