From afa75a5e569b84bbe9f978d821d12237a84cbcbe Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 17 Jun 2024 12:03:38 +0800 Subject: [PATCH] x2sys_cross returns different outputs on M1/M2 and Intel chipes --- pygmt/tests/test_x2sys_cross.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pygmt/tests/test_x2sys_cross.py b/pygmt/tests/test_x2sys_cross.py index 09f424d1a42..3220208fe2b 100644 --- a/pygmt/tests/test_x2sys_cross.py +++ b/pygmt/tests/test_x2sys_cross.py @@ -3,6 +3,7 @@ """ import copy +import platform import sys from pathlib import Path from tempfile import TemporaryDirectory @@ -55,7 +56,10 @@ def test_x2sys_cross_input_file_output_file(): assert output is None # check that output is None since outfile is set assert outfile.stat().st_size > 0 # check that outfile exists at path result = pd.read_csv(outfile, sep="\t", comment=">", header=2) - assert result.shape == (14374, 12) if sys.platform == "darwin" else (14338, 12) + if sys.platform == "darwin" and platform.processor() == "arm": + assert result.shape == (14374, 12) + else: + assert result.shape == (14294, 12) columns = list(result.columns) assert columns[:6] == ["# x", "y", "i_1", "i_2", "dist_1", "dist_2"] assert columns[6:] == ["head_1", "head_2", "vel_1", "vel_2", "z_X", "z_M"]