summaryrefslogtreecommitdiff
path: root/setuptools
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-12-16 13:52:48 -0500
committerJason R. Coombs <jaraco@jaraco.com>2022-12-16 13:52:48 -0500
commitf450469fbdfc0c4a15cf39afeb120e44fd04d4f1 (patch)
treea7207a248ba74c2b8c98b66d4df20ff3a387f8be /setuptools
parent19926d7b4555590dbb9e46f5b3959375902b2ddc (diff)
downloadpython-setuptools-git-f450469fbdfc0c4a15cf39afeb120e44fd04d4f1.tar.gz
⚫ Fade to black.
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/tests/test_virtualenv.py31
1 files changed, 21 insertions, 10 deletions
diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py
index 65358543..098d73ad 100644
--- a/setuptools/tests/test_virtualenv.py
+++ b/setuptools/tests/test_virtualenv.py
@@ -19,7 +19,7 @@ def pytest_virtualenv_works(venv):
pytest_virtualenv may not work. if it doesn't, skip these
tests. See #1284.
"""
- venv_prefix = venv.run(["python" , "-c", "import sys; print(sys.prefix)"]).strip()
+ venv_prefix = venv.run(["python", "-c", "import sys; print(sys.prefix)"]).strip()
if venv_prefix == sys.prefix:
pytest.skip("virtualenv is broken (see pypa/setuptools#1284)")
@@ -63,10 +63,11 @@ def access_pypi():
'https://github.com/pypa/pip/archive/main.zip',
marks=pytest.mark.xfail(reason='#2975'),
),
- ]
+ ],
)
-def test_pip_upgrade_from_source(pip_version, venv_without_setuptools,
- setuptools_wheel, setuptools_sdist):
+def test_pip_upgrade_from_source(
+ pip_version, venv_without_setuptools, setuptools_wheel, setuptools_sdist
+):
"""
Check pip can upgrade setuptools from source.
"""
@@ -90,10 +91,12 @@ def _check_test_command_install_requirements(venv, tmpdir):
"""
Check the test command will install all required dependencies.
"""
+
def sdist(distname, version):
dist_path = tmpdir.join('%s-%s.tar.gz' % (distname, version))
make_nspkg_sdist(str(dist_path), distname, version)
return dist_path
+
dependency_links = [
pathlib.Path(str(dist_path)).as_uri()
for dist_path in (
@@ -104,8 +107,9 @@ def _check_test_command_install_requirements(venv, tmpdir):
)
]
with tmpdir.join('setup.py').open('w') as fp:
- fp.write(DALS(
- '''
+ fp.write(
+ DALS(
+ '''
from setuptools import setup
setup(
@@ -127,17 +131,24 @@ def _check_test_command_install_requirements(venv, tmpdir):
""",
}}
)
- '''.format(dependency_links=dependency_links)))
+ '''.format(
+ dependency_links=dependency_links
+ )
+ )
+ )
with tmpdir.join('test.py').open('w') as fp:
- fp.write(DALS(
- '''
+ fp.write(
+ DALS(
+ '''
import foobar
import bits
import bobs
import pieces
open('success', 'w').close()
- '''))
+ '''
+ )
+ )
cmd = ["python", 'setup.py', 'test', '-s', 'test']
venv.run(cmd, cwd=str(tmpdir))