view tests/pathutil.py @ 362:ff595828a364

Update development `requirements.txt`, add code coverage tools.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 26 Apr 2015 08:34:27 -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