summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipunn Koorapati <nipunn1313@gmail.com>2021-08-07 15:23:54 -0700
committerTzu-ping Chung <uranusjr@gmail.com>2021-08-11 13:23:39 +0800
commitd03b8a84a28f6d7f0549ed3562ca7d068e666122 (patch)
tree3f946b4c1869e6c5f4fc01aa60cd0d4bb5e304e4
parentba5a6784edbd1b77e2faf837ccd92b6956fc2612 (diff)
downloadpip-d03b8a84a28f6d7f0549ed3562ca7d068e666122.tar.gz
Run black on tests/functional/test_uninstall_user.py
-rw-r--r--tests/functional/test_uninstall_user.py40
1 files changed, 19 insertions, 21 deletions
diff --git a/tests/functional/test_uninstall_user.py b/tests/functional/test_uninstall_user.py
index 7a0006d47..b77cea212 100644
--- a/tests/functional/test_uninstall_user.py
+++ b/tests/functional/test_uninstall_user.py
@@ -12,41 +12,41 @@ from tests.lib import assert_all_changes
@pytest.mark.incompatible_with_test_venv
class Tests_UninstallUserSite:
-
@pytest.mark.network
def test_uninstall_from_usersite(self, script):
"""
Test uninstall from usersite
"""
- result1 = script.pip('install', '--user', 'INITools==0.3')
- result2 = script.pip('uninstall', '-y', 'INITools')
- assert_all_changes(result1, result2, [script.venv / 'build', 'cache'])
+ result1 = script.pip("install", "--user", "INITools==0.3")
+ result2 = script.pip("uninstall", "-y", "INITools")
+ assert_all_changes(result1, result2, [script.venv / "build", "cache"])
- def test_uninstall_from_usersite_with_dist_in_global_site(
- self, virtualenv, script):
+ def test_uninstall_from_usersite_with_dist_in_global_site(self, virtualenv, script):
"""
Test uninstall from usersite (with same dist in global site)
"""
_patch_dist_in_site_packages(virtualenv)
- script.pip_install_local('pip-test-package==0.1', '--no-binary=:all:')
+ script.pip_install_local("pip-test-package==0.1", "--no-binary=:all:")
result2 = script.pip_install_local(
- '--user', 'pip-test-package==0.1.1', '--no-binary=:all:')
- result3 = script.pip('uninstall', '-vy', 'pip-test-package')
+ "--user", "pip-test-package==0.1.1", "--no-binary=:all:"
+ )
+ result3 = script.pip("uninstall", "-vy", "pip-test-package")
# uninstall console is mentioning user scripts, but not global scripts
assert normcase(script.user_bin_path) in result3.stdout, str(result3)
assert normcase(script.bin_path) not in result3.stdout, str(result3)
# uninstall worked
- assert_all_changes(result2, result3, [script.venv / 'build', 'cache'])
+ assert_all_changes(result2, result3, [script.venv / "build", "cache"])
# site still has 0.2 (can't look in result1; have to check)
# keep checking for egg-info because no-binary implies setup.py install
egg_info_folder = (
- script.base_path / script.site_packages /
- f'pip_test_package-0.1-py{pyversion}.egg-info'
+ script.base_path
+ / script.site_packages
+ / f"pip_test_package-0.1-py{pyversion}.egg-info"
)
assert isdir(egg_info_folder)
@@ -58,22 +58,20 @@ class Tests_UninstallUserSite:
# install
to_install = data.packages.joinpath("FSPkg")
- result1 = script.pip(
- 'install', '--user', '-e', to_install
- )
- egg_link = script.user_site / 'FSPkg.egg-link'
+ result1 = script.pip("install", "--user", "-e", to_install)
+ egg_link = script.user_site / "FSPkg.egg-link"
result1.did_create(egg_link)
# uninstall
- result2 = script.pip('uninstall', '-y', 'FSPkg')
+ result2 = script.pip("uninstall", "-y", "FSPkg")
assert not isfile(script.base_path / egg_link)
assert_all_changes(
result1,
result2,
[
- script.venv / 'build',
- 'cache',
- script.user_site / 'easy-install.pth',
- ]
+ script.venv / "build",
+ "cache",
+ script.user_site / "easy-install.pth",
+ ],
)