Skip to content

Commit 98d788a

Browse files
committed
Ignore Py_DEBUG warning on Windows for bdist_wheel test
1 parent c8ccd77 commit 98d788a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

setuptools/tests/test_bdist_wheel.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,15 @@ def test_build_number(dummy_dist, monkeypatch, tmp_path):
362362
"""
363363

364364

365-
@pytest.mark.filterwarnings("ignore:Config variable 'Py_DEBUG' is unset.*")
366-
# ^-- Warning may happen in Windows (inherited from original pypa/wheel implementation)
365+
# On Windows, a warning may inform the user that Py_DEBUG is unset.
366+
# This behaviour seems to be inherited from the original pypa/wheel implementation.
367+
ignore_pydebug = (
368+
pytest.mark.filterwarnings("ignore:Config variable 'Py_DEBUG' is unset.*")
369+
if sys.platform == "win32" else lambda x: x
370+
)
371+
372+
373+
@ignore_pydebug
367374
def test_limited_abi(monkeypatch, tmp_path, tmp_path_factory):
368375
"""Test that building a binary wheel with the limited ABI works."""
369376
proj_dir = tmp_path_factory.mktemp("dummy_dist")

0 commit comments

Comments
 (0)