Skip to content

Commit

Permalink
tests: remove universal setting for setuptools (#862)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Feb 18, 2025
1 parent e022952 commit 752f7b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
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

0 comments on commit 752f7b3

Please sign in to comment.