Skip example.py test on macos until keystone is fixed

This commit is contained in:
Duncan Ogilvie
2025-10-23 14:19:21 +02:00
parent e326516b0e
commit 1dd765fc16
2 changed files with 11 additions and 2 deletions
+9
View File
@@ -0,0 +1,9 @@
import sys
import pytest
def pytest_collection_modifyitems(config, items):
if sys.platform == "darwin":
skip_macos = pytest.mark.skip(reason="Skipped on macOS")
for item in items:
if "example.py" in str(item.fspath):
item.add_marker(skip_macos)
+2 -2
View File
@@ -1,8 +1,7 @@
import icicle
import keystone
import capstone
def assemble(code: str, addr: int = 0) -> bytes:
import keystone
ks = keystone.Ks(keystone.KS_ARCH_X86, keystone.KS_MODE_64)
encoding, count = ks.asm(code, addr)
if encoding is None:
@@ -10,6 +9,7 @@ def assemble(code: str, addr: int = 0) -> bytes:
return bytes(encoding)
def disassemble(code: bytes, addr: int = 0, max_count = 1000) -> str:
import capstone
result = ""
cs = capstone.Cs(capstone.CS_ARCH_X86, capstone.CS_MODE_64)
count = 0