Skip to content

Commit cc105a8

Browse files
committed
Make unit tests robust to the value of CIBW_ENABLE
1 parent 9536682 commit cc105a8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

unit_test/main_tests/main_options_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ def test_debug_traceback(monkeypatch, method, capfd):
422422

423423
@pytest.mark.parametrize("method", ["unset", "command_line", "env_var"])
424424
def test_enable(method, intercepted_build_args, monkeypatch):
425+
monkeypatch.delenv("CIBW_ENABLE")
426+
425427
if method == "command_line":
426428
monkeypatch.setattr(sys, "argv", [*sys.argv, "--enable", "pypy"])
427429
elif method == "env_var":

unit_test/option_prepare_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def ignore_context_call(*args, **kwargs):
5151
@pytest.mark.usefixtures("mock_build_container", "fake_package_dir")
5252
def test_build_default_launches(monkeypatch):
5353
monkeypatch.setattr(sys, "argv", [*sys.argv, "--platform=linux"])
54+
monkeypatch.delenv("CIBW_ENABLE")
5455

5556
main()
5657

0 commit comments

Comments
 (0)