diff --git a/tests/test_pipenv.py b/tests/test_pipenv.py index 4b67530f72..8a0d6812d2 100644 --- a/tests/test_pipenv.py +++ b/tests/test_pipenv.py @@ -11,6 +11,10 @@ from pipenv.vendor import toml from pipenv.vendor import delegator from pipenv.project import Project +try: + from pathlib import Path +except: + from pipenv.vendor.pathlib2 import Path os.environ['PIPENV_DONT_USE_PYENV'] = '1' @@ -870,7 +874,7 @@ def test_relative_paths(self): file_name = 'tablib-0.12.1.tar.gz' test_dir = os.path.join(os.path.dirname(os.path.abspath(__file__))) source_path = os.path.abspath(os.path.join(test_dir, 'test_artifacts', file_name)) - + with PipenvInstance() as p: artifact_dir = 'artifacts' artifact_path = os.path.join(p.path, artifact_dir) @@ -882,5 +886,5 @@ def test_relative_paths(self): dep = p.pipfile['packages'][key] assert 'path' in dep - assert u'{}'.format(os.path.join('.', artifact_dir, file_name)) == u'{}'.format(dep['path']) + assert Path(os.path.join('.', artifact_dir, file_name)) == Path(dep['path']) assert c.return_code == 0