Skip to content

Commit 40bccf5

Browse files
committed
test-signalhandler.py: adjusted expected result for macos-14
1 parent 0cf462f commit 40bccf5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/signal/test-signalhandler.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import pytest
55
import platform
66

7+
from packaging.version import Version
8+
79
def __lookup_cppcheck_exe(exe_name):
810
# path the script is located in
911
script_path = os.path.dirname(os.path.realpath(__file__))
@@ -62,8 +64,7 @@ def test_segv():
6264
assert stderr == ''
6365
lines = stdout.splitlines()
6466
if sys.platform == "darwin":
65-
print(platform.mac_ver())
66-
if int(platform.mac_ver()[1][0]) >= 14:
67+
if Version(platform.mac_ver()[0]) >= Version('14'):
6768
assert lines[0] == 'Internal error: cppcheck received signal SIGSEGV - SEGV_ACCERR (at 0x0).'
6869
else:
6970
assert lines[0] == 'Internal error: cppcheck received signal SIGSEGV - SEGV_MAPERR (at 0x0).'

0 commit comments

Comments
 (0)