Skip to content

Commit 2ea1060

Browse files
committed
Skip read_alignments tests on big-endian systems
1 parent c59972e commit 2ea1060

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_fileops.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import sys
12
from io import StringIO
23

34
import pandas as pd
45
import pytest
56

67
import bioframe
78

9+
is_big_endian = sys.byteorder == "big"
10+
811

912
############# tests #####################
1013
def test_read_table():
@@ -55,12 +58,14 @@ def test_read_beds():
5558
schema_is_strict=True)
5659

5760

61+
@pytest.mark.skipif(is_big_endian, reason="Test skipped on big-endian systems")
5862
def test_read_sam():
5963
pytest.importorskip("pysam")
6064
# SAM file taken from https://github.com/samtools/samtools/blob/develop/examples/toy.sam
6165
_ = bioframe.read_alignments('tests/test_data/toy.sam')
6266

6367

68+
@pytest.mark.skipif(is_big_endian, reason="Test skipped on big-endian systems")
6469
def test_read_bam():
6570
pytest.importorskip("pysam")
6671
# converted toy.sam via `samtools view -bS toy.sam > toy.bam;

0 commit comments

Comments
 (0)