File: Don-t-run-LMV-test-on-big-endian-archs.patch

package info (click to toggle)
spectral-cube 0.6.6-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,108 kB
  • sloc: python: 13,236; makefile: 154
file content (34 lines) | stat: -rw-r--r-- 1,027 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Ole Streicher <olebole@debian.org>
Date: Sat, 8 Jun 2024 14:02:08 +0200
Subject: Don't run LMV test on big endian archs

the LMV reader is little endian only, so it will fail on S390x and
other big endian architectures. However, LMV is quite special (it
comes from the IRAM/GILDAS software), and its use on S390 is quite
exotic.

https://github.com/radio-astro-tools/spectral-cube/issues/903
---
 spectral_cube/tests/test_io.py | 7 +++++++
 1 file changed, 7 insertions(+)

--- a/spectral_cube/tests/test_io.py
+++ b/spectral_cube/tests/test_io.py
@@ -1,3 +1,6 @@
+import sys
+import pytest
+
 import numpy as np
 from astropy.io import fits as pyfits
 from astropy import units as u
@@ -13,6 +16,10 @@
 from ..dask_spectral_cube import DaskSpectralCube
 
 
+@pytest.mark.skipif(
+    sys.byteorder!="little",
+    reason="https://github.com/radio-astro-tools/spectral-cube/issues/903",
+)
 def test_lmv_fits():
     c1 = SpectralCube.read(path('example_cube.fits'))
     c2 = SpectralCube.read(path('example_cube.lmv'))