Mercurial > piecrust2
view tests/pathutil.py @ 492:d90ccdf18156
tests: Fix processing tests on Windows.
See the comment in `pipeline.py` for more info but basically I was passing
already initialized processors to the worker pool, which means pickling the
whole app. Pretty bad. Interesting that it only broke on Windows, though.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 23 Jul 2015 22:07:32 -0700 |
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