From 23581d44bd94a54eeb10f43a5a317420db02b269 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Mon, 18 Jun 2018 14:00:19 +0200 Subject: [PATCH] add missed file --- src/_pytest/paths.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/_pytest/paths.py diff --git a/src/_pytest/paths.py b/src/_pytest/paths.py new file mode 100644 index 000000000..7c0dc1ec1 --- /dev/null +++ b/src/_pytest/paths.py @@ -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)