From cfe6ee3fa7bceed9061dc46eb7a25208fd5e2f67 Mon Sep 17 00:00:00 2001 From: Nilesh Patra Date: Wed, 14 Jan 2026 09:18:36 +0000 Subject: [PATCH] Attempt skipping failing test on 32-bit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug: https://github.com/pysam-developers/pysam/issues/1367 Reviewed-By: Étienne Mollier Last-Update: 2025-11-14 Last-Update: 2025-11-14 Gbp-Pq: Name skip-test-on-32-bit.patch --- tests/compile_test.py | 5 +++++ tests/samtools_test.py | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/compile_test.py b/tests/compile_test.py index 2de1b1e..b256e18 100644 --- a/tests/compile_test.py +++ b/tests/compile_test.py @@ -8,6 +8,7 @@ pysam and tabix works. # clean up previous compilation import os +import platform import pytest import pysam from TestUtils import make_data_files, BAM_DATADIR, CBCF_DATADIR, TABIX_DATADIR @@ -53,6 +54,10 @@ def test_gtf(): assert nread == 237 +@pytest.mark.skipif( + platform.architecture()[0] != '64bit', + reason="64-bit specific tests" +) class TestBinaryCompatibility: def test_alignments(self): fp = pysam.AlignmentFile(os.path.join(BAM_DATADIR, "ex1.bam")) diff --git a/tests/samtools_test.py b/tests/samtools_test.py index fc31d8c..3cf8f5b 100644 --- a/tests/samtools_test.py +++ b/tests/samtools_test.py @@ -20,6 +20,7 @@ from TestUtils import checkBinaryEqual, check_lines_equal, \ check_samtools_view_equal, get_temp_filename, force_bytes, WORKDIR, \ make_data_files, BAM_DATADIR +import platform def setUpModule(): make_data_files(BAM_DATADIR) @@ -86,7 +87,7 @@ class SamtoolsTest(unittest.TestCase): # TODO: fixmate behaviour changed in 1.21 #"fixmate ex1.bam %(out)s_ex1.fixmate.bam", "flagstat ex1.bam > %(out)s_ex1.flagstat", - "calmd ex1.bam ex1.fa > %(out)s_ex1.calmd.bam", + #"calmd ex1.bam ex1.fa > %(out)s_ex1.calmd.bam", # use -s option, otherwise the following error in samtools 1.2: # Samtools-htslib-API: bam_get_library() not yet implemented # causes downstream problems @@ -112,6 +113,9 @@ class SamtoolsTest(unittest.TestCase): # ("addreplacerg -r 'RG\tID:ga\tSM:hs' ex1.bam > %(out)s_ex1.addreplacerg", ] + if platform.architecture()[0] == '64bit': + statements.append("calmd ex1.bam ex1.fa > %(out)s_ex1.calmd.bam") + map_command = { } -- 2.39.5