Skip to content

Commit 368e73c

Browse files
committed
skip tests on platforms without resolve_addr
1 parent fc163a7 commit 368e73c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vmprof/test/test_c_symboltable.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
from cffi import FFI
55
from array import array
66

7+
import _vmprof
8+
79
if sys.platform != 'win32':
810

911
ffi = FFI()
@@ -129,8 +131,8 @@ def test_sofile_in_srcfile(self):
129131
# osx
130132
assert b"libsystem_c.dylib" in ffi.string(src[0])
131133

134+
@pytest.mark.skipif("not hasattr(_vmprof, 'resolve_addr')")
132135
def test_vmprof_resolve_addr(self):
133-
import _vmprof
134136
res = _vmprof.resolve_addr(int(self.ffi.cast('intptr_t', self.lib.get_somefunc(0))))
135137
assert res[0] == 'somefunc'
136138

0 commit comments

Comments
 (0)