Mercurial > piecrust2
view tests/pathutil.py @ 779:982de61e7da9
tests: Fix some CLI tests.
Add auto-stripping of newlines in the CLI output for tests that use the simple
YAML string value for the expected output.
Also, fix `showconfig` test to expect a root URL with a trailing slash.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 16 Jul 2016 15:04:36 +0200 |
parents | a2d283d1033d |
children |
line wrap: on
line source
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