mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Reformat codes
This commit is contained in:
@@ -1,30 +1,34 @@
|
||||
# -*- coding=utf-8 -*-
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
import errno
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import signal
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
import warnings
|
||||
|
||||
from shutil import copyfileobj, rmtree as _rmtree
|
||||
from shutil import rmtree as _rmtree
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
|
||||
from pipenv.vendor.vistir.compat import ResourceWarning, fs_str, fs_encode, FileNotFoundError, PermissionError, TemporaryDirectory
|
||||
from pipenv.vendor.vistir.misc import run
|
||||
from pipenv.vendor.vistir.contextmanagers import temp_environ
|
||||
from pipenv.vendor.vistir.path import mkdir_p, create_tracked_tempdir, handle_remove_readonly
|
||||
|
||||
from pipenv._compat import Path
|
||||
from pipenv.exceptions import VirtualenvActivationException
|
||||
from pipenv.vendor import delegator, toml, tomlkit
|
||||
from pytest_pypi.app import prepare_fixtures, prepare_packages as prepare_pypi_packages
|
||||
from pipenv.vendor.vistir.compat import (
|
||||
FileNotFoundError, PermissionError, ResourceWarning, TemporaryDirectory,
|
||||
fs_encode, fs_str
|
||||
)
|
||||
from pipenv.vendor.vistir.contextmanagers import temp_environ
|
||||
from pipenv.vendor.vistir.misc import run
|
||||
from pipenv.vendor.vistir.path import (
|
||||
create_tracked_tempdir, handle_remove_readonly, mkdir_p
|
||||
)
|
||||
from pytest_pypi.app import prepare_fixtures
|
||||
from pytest_pypi.app import prepare_packages as prepare_pypi_packages
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
warnings.simplefilter("default", category=ResourceWarning)
|
||||
@@ -399,7 +403,6 @@ class _PipenvInstance(object):
|
||||
|
||||
def _rmtree_func(path, ignore_errors=True, onerror=None):
|
||||
directory = fs_encode(path)
|
||||
global _rmtree
|
||||
shutil_rmtree = _rmtree
|
||||
if onerror is None:
|
||||
onerror = handle_remove_readonly
|
||||
|
||||
@@ -223,7 +223,7 @@ def test_install_parse_error(PipenvInstance):
|
||||
[dev-packages]
|
||||
""".strip()
|
||||
f.write(contents)
|
||||
c = p.pipenv('install requests u/\\/p@r\$34b13+pkg')
|
||||
c = p.pipenv('install requests u/\\/p@r\\$34b13+pkg')
|
||||
assert c.return_code != 0
|
||||
assert 'u/\\/p@r$34b13+pkg' not in p.pipfile['packages']
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@ import os
|
||||
import pytest
|
||||
|
||||
from pipenv._compat import Path, TemporaryDirectory
|
||||
from pipenv.project import Project
|
||||
from pipenv.utils import get_windows_path, normalize_drive, temp_environ
|
||||
from pipenv.vendor import delegator
|
||||
from pipenv.utils import normalize_drive, temp_environ
|
||||
|
||||
|
||||
@pytest.mark.dotvenv
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, print_function
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import pytest
|
||||
from flaky import flaky
|
||||
|
||||
from pipenv._compat import Path
|
||||
from pipenv.project import Project
|
||||
from pipenv.utils import mkdir_p, temp_environ
|
||||
from pipenv.vendor import delegator
|
||||
|
||||
@@ -40,7 +39,6 @@ setup(
|
||||
""".strip()
|
||||
fh.write(contents)
|
||||
line = "-e .[dev]"
|
||||
pipfile = {"testpipenv": {"path": ".", "editable": True, "extras": ["dev"]}}
|
||||
with open(os.path.join(p.path, 'Pipfile'), 'w') as fh:
|
||||
fh.write("""
|
||||
[packages]
|
||||
|
||||
@@ -659,4 +659,4 @@ six = "*"
|
||||
c = p.pipenv("lock --clear")
|
||||
assert c.return_code == 0
|
||||
assert "index" in p.lockfile["default"]["six"]
|
||||
assert p.lockfile["default"]["six"]["index"] == "custom", Path(p.lockfile_path).read_text() # p.lockfile["default"]["six"]
|
||||
assert p.lockfile["default"]["six"]["index"] == "custom", Path(p.lockfile_path).read_text() # p.lockfile["default"]["six"]
|
||||
|
||||
@@ -11,7 +11,6 @@ from pipenv.project import Project
|
||||
from pipenv.utils import temp_environ
|
||||
from pipenv.vendor.vistir.path import is_in_path
|
||||
from pipenv.vendor.delegator import run as delegator_run
|
||||
import pipenv.environments
|
||||
|
||||
|
||||
@pytest.mark.project
|
||||
|
||||
@@ -5,7 +5,6 @@ import os
|
||||
import pytest
|
||||
|
||||
from pipenv._compat import Path
|
||||
from pipenv.project import Project
|
||||
|
||||
|
||||
# This module is run only on Windows.
|
||||
|
||||
Reference in New Issue
Block a user