ufoLib.__init__: use os.path instead of slash to fix doctest failing on Windows

This commit is contained in:
Cosimo Lupo 2016-09-11 17:44:12 +01:00
parent 8db42c8e37
commit f320554077

View File

@ -1176,10 +1176,12 @@ def makeUFOPath(path):
""" """
Return a .ufo pathname. Return a .ufo pathname.
>>> makeUFOPath("/directory/something.ext") >>> makeUFOPath("directory/something.ext") == (
'/directory/something.ufo' ... os.path.join('directory', 'something.ufo'))
>>> makeUFOPath("/directory/something.another.thing.ext") True
'/directory/something.another.thing.ufo' >>> makeUFOPath("directory/something.another.thing.ext") == (
... os.path.join('directory', 'something.another.thing.ufo'))
True
""" """
dir, name = os.path.split(path) dir, name = os.path.split(path)
name = ".".join([".".join(name.split(".")[:-1]), "ufo"]) name = ".".join([".".join(name.split(".")[:-1]), "ufo"])