Mercurial > piecrust2
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 285:6e9b5530306e | 286:a2d283d1033d |
|---|---|
| 1 import os | |
| 2 | |
| 3 | |
| 4 def slashfix(path): | |
| 5 if path is None: | |
| 6 return None | |
| 7 if isinstance(path, str): | |
| 8 return path.replace('/', os.sep) | |
| 9 fixed = [] | |
| 10 for p in path: | |
| 11 fixed.append(p.replace('/', os.sep)) | |
| 12 return fixed | |
| 13 |
