From 4485f39f9e038a37eb08aa6cd89a98078a5d20e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=89tienne=20Mollier?= Date: Sun, 29 Jan 2023 22:32:22 +0000 Subject: [PATCH] skip tests bound to fail past python3.11. Bug: https://github.com/pysam-developers/pysam/issues/1151 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024425 Last-Update: 2022-12-27 Thanks John Marshall and Graham Inggs for the independent suggestion. Last-Update: 2022-12-27 Gbp-Pq: Name disable-tests-python3.11.patch --- tests/AlignmentFilePileup_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/AlignmentFilePileup_test.py b/tests/AlignmentFilePileup_test.py index 8e75a52..72baaef 100644 --- a/tests/AlignmentFilePileup_test.py +++ b/tests/AlignmentFilePileup_test.py @@ -1,5 +1,6 @@ """Benchmarking module for AlignmentFile functionality""" import os +import sys import pysam import unittest from TestUtils import make_data_files, BAM_DATADIR, IS_PYTHON3, force_str, flatten_nested_list @@ -206,6 +207,10 @@ class TestPileupObjects(unittest.TestCase): def tearDown(self): self.samfile.close() + @unittest.skipIf((sys.version_info.major == 3 + and sys.version_info.minor >= 11) + or sys.version_info.major >= 4, + "Test known to fail past python3.11.") def testIteratorOutOfScope(self): '''test if exception is raised if pileup col is accessed after iterator is exhausted.''' -- 2.30.2