Skip to content

Commit

Permalink
Update tests for hatchling 1.25
Browse files Browse the repository at this point in the history
pypa/hatch#1438 changed the default tag selection in hatchling:

> Linux tag is after many/musl; packaging tools are required to skip
> many/musl, see pypa/packaging#160
  • Loading branch information
stefanor committed Jun 28, 2024
1 parent 5a198c0 commit 26a4bd0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

from .utils import build_project

best_matching_tag = next(iter(t for t in sys_tags() if 'manylinux' not in t.platform and 'musllinux' not in t.platform))


def test_target_not_wheel(new_project):
project_file = new_project / 'pyproject.toml'
Expand Down Expand Up @@ -36,7 +38,6 @@ def test_no_exclusion(new_project, compiled_extension):
assert len(artifacts) == 1
wheel_file = artifacts[0]

best_matching_tag = next(sys_tags())
assert wheel_file.name == f'my_app-1.2.3-{best_matching_tag}.whl'

extraction_directory = new_project.parent / '_archive'
Expand Down Expand Up @@ -100,7 +101,6 @@ def test_exclusion(new_project, compiled_extension):
assert len(artifacts) == 1
wheel_file = artifacts[0]

best_matching_tag = next(sys_tags())
assert wheel_file.name == f'my_app-1.2.3-{best_matching_tag}.whl'

extraction_directory = new_project.parent / '_archive'
Expand Down Expand Up @@ -154,7 +154,6 @@ def test_separation(new_project):
assert len(artifacts) == 1
wheel_file = artifacts[0]

best_matching_tag = next(sys_tags())
assert wheel_file.name == f'my_app-1.2.3-{best_matching_tag}.whl'

extraction_directory = new_project.parent / '_archive'
Expand Down Expand Up @@ -211,7 +210,6 @@ def test_src_layout(new_project, compiled_extension):
assert len(artifacts) == 1
wheel_file = artifacts[0]

best_matching_tag = next(sys_tags())
assert wheel_file.name == f'my_app-1.2.3-{best_matching_tag}.whl'

extraction_directory = new_project.parent / '_archive'
Expand Down Expand Up @@ -278,7 +276,6 @@ def test_dependency(new_project, compiled_extension):
assert len(artifacts) == 1
wheel_file = artifacts[0]

best_matching_tag = next(sys_tags())
assert wheel_file.name == f'my_app-1.2.3-{best_matching_tag}.whl'

extraction_directory = new_project.parent / '_archive'
Expand Down Expand Up @@ -334,7 +331,6 @@ def test_build_dir(new_project, compiled_extension):
assert len(artifacts) == 1
wheel_file = artifacts[0]

best_matching_tag = next(sys_tags())
assert wheel_file.name == f'my_app-1.2.3-{best_matching_tag}.whl'

extraction_directory = new_project.parent / '_archive'
Expand Down

0 comments on commit 26a4bd0

Please sign in to comment.