fix: error if build selectors are empty
This commit is contained in:
committed by
Henry Schreiner
parent
27a0053386
commit
61b94434b2
@@ -52,6 +52,7 @@ def test_unknown_platform(monkeypatch, capsys):
|
||||
assert 'cibuildwheel: Unsupported platform: nonexistent' in err
|
||||
|
||||
|
||||
@pytest.mark.allow_empty('windows')
|
||||
def test_platform_argument(platform, intercepted_build_args, monkeypatch):
|
||||
monkeypatch.setenv('CIBW_PLATFORM', 'nonexistent')
|
||||
monkeypatch.setattr(sys, 'argv', sys.argv + ['--platform', platform])
|
||||
@@ -61,12 +62,14 @@ def test_platform_argument(platform, intercepted_build_args, monkeypatch):
|
||||
assert intercepted_build_args.args[0].package_dir == MOCK_PACKAGE_DIR
|
||||
|
||||
|
||||
@pytest.mark.allow_empty('windows')
|
||||
def test_platform_environment(platform, intercepted_build_args, monkeypatch):
|
||||
main()
|
||||
|
||||
assert intercepted_build_args.args[0].package_dir == MOCK_PACKAGE_DIR
|
||||
|
||||
|
||||
@pytest.mark.allow_empty('windows')
|
||||
def test_archs_default(platform, intercepted_build_args, monkeypatch):
|
||||
monkeypatch.setattr(platform_module, 'machine', lambda: 'x86_64')
|
||||
|
||||
@@ -79,6 +82,7 @@ def test_archs_default(platform, intercepted_build_args, monkeypatch):
|
||||
assert build_options.architectures == {Architecture.x86_64}
|
||||
|
||||
|
||||
@pytest.mark.allow_empty('windows')
|
||||
@pytest.mark.parametrize('use_env_var', [False, True])
|
||||
def test_archs_argument(platform, intercepted_build_args, monkeypatch, use_env_var):
|
||||
monkeypatch.setattr(platform_module, 'machine', lambda: 'x86_64')
|
||||
@@ -112,6 +116,7 @@ def test_archs_platform_specific(platform, intercepted_build_args, monkeypatch):
|
||||
assert build_options.architectures == {Architecture.x86_64}
|
||||
|
||||
|
||||
@pytest.mark.allow_empty('windows')
|
||||
def test_archs_platform_native(platform, intercepted_build_args, monkeypatch):
|
||||
monkeypatch.setattr(platform_module, 'machine', lambda: 'x86_64')
|
||||
monkeypatch.setenv('CIBW_ARCHS', 'native')
|
||||
|
||||
Reference in New Issue
Block a user