fix: error if build selectors are empty

This commit is contained in:
Henry Fredrick Schreiner
2021-01-22 13:01:00 -05:00
committed by Henry Schreiner
parent 27a0053386
commit 61b94434b2
5 changed files with 47 additions and 3 deletions
+9
View File
@@ -59,6 +59,15 @@ def fake_package_dir(monkeypatch):
def platform(request, monkeypatch):
platform_value = request.param
monkeypatch.setenv('CIBW_PLATFORM', platform_value)
marker = request.node.get_closest_marker('allow_empty')
if marker is not None and (len(marker.args) == 0 or platform_value in marker.args):
def pass_exit(val: int):
if val not in {3}:
sys.exit(val)
monkeypatch.setattr(sys, 'exit', pass_exit)
return platform_value