mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 14:50:16 +00:00
@@ -4,18 +4,12 @@ import warnings
|
||||
|
||||
import pytest
|
||||
|
||||
from pipenv._compat import TemporaryDirectory
|
||||
from pipenv._compat import TemporaryDirectory, Path
|
||||
from pipenv.vendor import delegator
|
||||
from pipenv.vendor import requests
|
||||
from pipenv.vendor import six
|
||||
from pipenv.vendor import toml
|
||||
|
||||
try:
|
||||
from pathlib import Path
|
||||
except ImportError:
|
||||
from pipenv.vendor.pathlib2 import Path
|
||||
|
||||
|
||||
if six.PY2:
|
||||
class ResourceWarning(Warning):
|
||||
pass
|
||||
|
||||
@@ -2,13 +2,9 @@ import contextlib
|
||||
import os
|
||||
|
||||
from pipenv.utils import temp_environ
|
||||
from pipenv._compat import TemporaryDirectory
|
||||
from pipenv._compat import TemporaryDirectory, Path
|
||||
from pipenv.vendor import delegator
|
||||
from pipenv.project import Project
|
||||
try:
|
||||
from pathlib import Path
|
||||
except ImportError:
|
||||
from pipenv.vendor.pathlib2 import Path
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import os
|
||||
import shutil
|
||||
from pipenv.project import Project
|
||||
try:
|
||||
import pathlib
|
||||
except ImportError:
|
||||
import pathlib2 as pathlib
|
||||
from pipenv._compat import Path
|
||||
|
||||
from pipenv.utils import mkdir_p, temp_environ
|
||||
|
||||
@@ -223,7 +220,7 @@ def test_relative_paths(PipenvInstance, pypi, testsroot):
|
||||
dep = p.pipfile['packages'][key]
|
||||
|
||||
assert 'path' in dep
|
||||
assert pathlib.Path('.', artifact_dir, file_name) == pathlib.Path(dep['path'])
|
||||
assert Path('.', artifact_dir, file_name) == Path(dep['path'])
|
||||
assert c.return_code == 0
|
||||
|
||||
|
||||
|
||||
@@ -2,10 +2,7 @@ import pytest
|
||||
import os
|
||||
from flaky import flaky
|
||||
import delegator
|
||||
try:
|
||||
from pathlib import Path
|
||||
except ImportError:
|
||||
from pathlib2 import Path
|
||||
from pipenv._compat import Path
|
||||
|
||||
|
||||
@pytest.mark.vcs
|
||||
|
||||
@@ -11,11 +11,7 @@ import pytest
|
||||
from pipenv.core import activate_virtualenv
|
||||
from pipenv.project import Project
|
||||
from pipenv.vendor import delegator
|
||||
|
||||
try:
|
||||
from pathlib import Path
|
||||
except ImportError:
|
||||
from pipenv.vendor.pathlib2 import Path
|
||||
from pipenv._compat import Path
|
||||
|
||||
|
||||
@pytest.mark.code
|
||||
@@ -123,4 +119,4 @@ def test_directory_with_leading_dash(PipenvInstance):
|
||||
assert os.path.isdir(venv_path)
|
||||
# Manually clean up environment, since PipenvInstance assumes that
|
||||
# the virutalenv is in the project directory.
|
||||
p.pipenv('--rm')
|
||||
p.pipenv('--rm')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
from pipenv.project import Project
|
||||
from pipenv.vendor import pathlib2 as pathlib
|
||||
from pipenv._compat import Path
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -33,7 +33,7 @@ def test_case_changes_windows(PipenvInstance, pypi):
|
||||
@pytest.mark.files
|
||||
def test_local_path_windows(PipenvInstance, pypi):
|
||||
whl = (
|
||||
pathlib.Path(__file__).parent.parent
|
||||
Path(__file__).parent.parent
|
||||
.joinpath('pypi', 'six', 'six-1.11.0-py2.py3-none-any.whl')
|
||||
)
|
||||
try:
|
||||
@@ -48,7 +48,7 @@ def test_local_path_windows(PipenvInstance, pypi):
|
||||
@pytest.mark.files
|
||||
def test_local_path_windows_forward_slash(PipenvInstance, pypi):
|
||||
whl = (
|
||||
pathlib.Path(__file__).parent.parent
|
||||
Path(__file__).parent.parent
|
||||
.joinpath('pypi', 'six', 'six-1.11.0-py2.py3-none-any.whl')
|
||||
)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user