tests: fix arch for platform tests

This commit is contained in:
Henry Fredrick Schreiner
2021-01-22 13:01:00 -05:00
committed by Henry Schreiner
parent 61b94434b2
commit c90c7666b9
3 changed files with 6 additions and 14 deletions
+6
View File
@@ -1,3 +1,4 @@
import platform as platform_module
import subprocess
import sys
from pathlib import Path
@@ -60,6 +61,11 @@ def platform(request, monkeypatch):
platform_value = request.param
monkeypatch.setenv('CIBW_PLATFORM', platform_value)
if platform_value == 'windows':
monkeypatch.setattr(platform_module, 'machine', lambda: 'AMD64')
else:
monkeypatch.setattr(platform_module, 'machine', lambda: 'x86_64')
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):