Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: remove universal setting for setuptools #862

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ def build_wheel(wheel_directory, config_settings=None, metadata_directory=None):
msg = 'some-file-that-is-needed-for-build.txt is missing!'
raise FileNotFoundError(msg)
# pragma: no cover
file = 'test_cant_build_via_sdist-1.0.0-py2.py3-none-any.whl'
file = 'test_cant_build_via_sdist-1.0.0-py3-none-any.whl'
zipfile.ZipFile(os.path.join(wheel_directory, file), 'w').close()
return file
3 changes: 0 additions & 3 deletions tests/packages/test-setuptools/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[metadata]
name = test_setuptools
version = 1.0.0

[bdist_wheel]
universal = 1
14 changes: 7 additions & 7 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def test_build_package(tmp_dir, package_test_setuptools):
build.__main__.build_package(package_test_setuptools, tmp_dir, ['sdist', 'wheel'])

assert sorted(os.listdir(tmp_dir)) == [
'test_setuptools-1.0.0-py2.py3-none-any.whl',
'test_setuptools-1.0.0-py3-none-any.whl',
'test_setuptools-1.0.0.tar.gz',
]

Expand All @@ -213,7 +213,7 @@ def test_build_package_via_sdist(tmp_dir, package_test_setuptools):
build.__main__.build_package_via_sdist(package_test_setuptools, tmp_dir, ['wheel'])

assert sorted(os.listdir(tmp_dir)) == [
'test_setuptools-1.0.0-py2.py3-none-any.whl',
'test_setuptools-1.0.0-py3-none-any.whl',
'test_setuptools-1.0.0.tar.gz',
]

Expand Down Expand Up @@ -247,7 +247,7 @@ def test_build_package_via_sdist_invalid_distribution(tmp_dir, package_test_setu
' - setuptools >= 42.0.0',
'* Getting build dependencies for wheel...',
'* Building wheel...',
'Successfully built test_setuptools-1.0.0.tar.gz and test_setuptools-1.0.0-py2.py3-none-any.whl',
'Successfully built test_setuptools-1.0.0.tar.gz and test_setuptools-1.0.0-py3-none-any.whl',
],
id='via-sdist-isolation',
marks=[pytest.mark.network, pytest.mark.isolated],
Expand All @@ -260,7 +260,7 @@ def test_build_package_via_sdist_invalid_distribution(tmp_dir, package_test_setu
'* Building wheel from sdist',
'* Getting build dependencies for wheel...',
'* Building wheel...',
'Successfully built test_setuptools-1.0.0.tar.gz and test_setuptools-1.0.0-py2.py3-none-any.whl',
'Successfully built test_setuptools-1.0.0.tar.gz and test_setuptools-1.0.0-py3-none-any.whl',
],
id='via-sdist-no-isolation',
),
Expand All @@ -272,7 +272,7 @@ def test_build_package_via_sdist_invalid_distribution(tmp_dir, package_test_setu
' - setuptools >= 42.0.0',
'* Getting build dependencies for wheel...',
'* Building wheel...',
'Successfully built test_setuptools-1.0.0-py2.py3-none-any.whl',
'Successfully built test_setuptools-1.0.0-py3-none-any.whl',
],
id='wheel-direct-isolation',
marks=[pytest.mark.network, pytest.mark.isolated],
Expand All @@ -282,7 +282,7 @@ def test_build_package_via_sdist_invalid_distribution(tmp_dir, package_test_setu
[
'* Getting build dependencies for wheel...',
'* Building wheel...',
'Successfully built test_setuptools-1.0.0-py2.py3-none-any.whl',
'Successfully built test_setuptools-1.0.0-py3-none-any.whl',
],
id='wheel-direct-no-isolation',
),
Expand All @@ -302,7 +302,7 @@ def test_build_package_via_sdist_invalid_distribution(tmp_dir, package_test_setu
'* Building sdist...',
'* Getting build dependencies for wheel...',
'* Building wheel...',
'Successfully built test_setuptools-1.0.0.tar.gz and test_setuptools-1.0.0-py2.py3-none-any.whl',
'Successfully built test_setuptools-1.0.0.tar.gz and test_setuptools-1.0.0-py3-none-any.whl',
],
id='sdist-and-wheel-direct-no-isolation',
),
Expand Down
Loading