Skip to content

Commit

Permalink
Skip read_alignments tests on big-endian systems
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictus committed Jun 19, 2024
1 parent c59972e commit 2ea1060
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_fileops.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import sys
from io import StringIO

import pandas as pd
import pytest

import bioframe

is_big_endian = sys.byteorder == "big"


############# tests #####################
def test_read_table():
Expand Down Expand Up @@ -55,12 +58,14 @@ def test_read_beds():
schema_is_strict=True)


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


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

0 comments on commit 2ea1060

Please sign in to comment.