add missed file

This commit is contained in:
Ronny Pfannschmidt 2018-06-18 14:00:19 +02:00
parent c7eb53317b
commit 23581d44bd
1 changed files with 13 additions and 0 deletions

13
src/_pytest/paths.py Normal file
View File

@ -0,0 +1,13 @@
from .compat import Path
from os.path import expanduser, expandvars, isabs
def resolve_from_str(input, root):
assert not isinstance(input, Path), "would break on py2"
root = Path(root)
input = expanduser(input)
input = expandvars(input)
if isabs(input):
return Path(input)
else:
return root.joinpath(input)