Files
jundot--omlx/tests/test_native_import_error_tracebacks.py
wehub-resource-sync e9a2f726c9
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.13) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:29:51 +08:00

17 lines
600 B
Python

def _assert_detached(exc):
if exc is None:
return
assert exc.__traceback__ is None
assert exc.__cause__ is None
assert exc.__context__ is None
def test_optional_native_kernel_import_errors_do_not_retain_tracebacks():
from omlx.custom_kernels.glm_moe_dsa import fast as glm_fast
from omlx.custom_kernels.minimax_m3 import fast as minimax_fast
from omlx.patches.glm_moe_dsa.kernels import fast as glm_dispatch
_assert_detached(glm_fast.import_error())
_assert_detached(minimax_fast.import_error())
_assert_detached(glm_dispatch.native_import_error())