mirror of
https://github.com/icicle-emu/icicle-python
synced 2026-06-21 13:53:41 +00:00
Skip example.py test on macos until keystone is fixed
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user