Skip to content

Commit

Permalink
Fix formatting and imports for Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p authored and abravalheri committed Nov 4, 2024
1 parent 956a2e9 commit 7a298d9
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions setuptools/tests/test_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,14 +564,17 @@ def test_wheel_install(params):
install_tree = params.get('install_tree')
file_defs = params.get('file_defs', {})
setup_kwargs = params.get('setup_kwargs', {})
with build_wheel(
name=project_name,
version=version,
install_requires=install_requires,
extras_require=extras_require,
extra_file_defs=file_defs,
**setup_kwargs,
) as filename, tempdir() as install_dir:
with (
build_wheel(
name=project_name,
version=version,
install_requires=install_requires,
extras_require=extras_require,
extra_file_defs=file_defs,
**setup_kwargs,
) as filename,
tempdir() as install_dir,
):
_check_wheel_install(
filename, install_dir, install_tree, project_name, version, requires_txt
)
Expand All @@ -580,10 +583,13 @@ def test_wheel_install(params):
def test_wheel_install_pep_503():
project_name = 'Foo_Bar' # PEP 503 canonicalized name is "foo-bar"
version = '1.0'
with build_wheel(
name=project_name,
version=version,
) as filename, tempdir() as install_dir:
with (
build_wheel(
name=project_name,
version=version,
) as filename,
tempdir() as install_dir,
):
new_filename = filename.replace(project_name, canonicalize_name(project_name))
shutil.move(filename, new_filename)
_check_wheel_install(
Expand Down Expand Up @@ -687,14 +693,17 @@ def build_wheel(extra_file_defs=None, **kwargs):
file_defs = params.get('file_defs', {})
setup_kwargs = params.get('setup_kwargs', {})

with build_wheel(
name=project_name,
version=version,
install_requires=[],
extras_require={},
extra_file_defs=file_defs,
**setup_kwargs,
) as filename, tempdir() as install_dir:
with (
build_wheel(
name=project_name,
version=version,
install_requires=[],
extras_require={},
extra_file_defs=file_defs,
**setup_kwargs,
) as filename,
tempdir() as install_dir,
):
_check_wheel_install(
filename, install_dir, install_tree, project_name, version, None
)
Expand Down

0 comments on commit 7a298d9

Please sign in to comment.