disable-tests-python3.11.patch: add; work around test failure.
authorÉtienne Mollier <emollier@debian.org>
Tue, 27 Dec 2022 10:35:48 +0000 (11:35 +0100)
committerÉtienne Mollier <emollier@debian.org>
Tue, 27 Dec 2022 10:35:48 +0000 (11:35 +0100)
Thanks: John Marshall and Graham Inggs
Closes: #1024425
debian/patches/disable-tests-python3.11.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/disable-tests-python3.11.patch b/debian/patches/disable-tests-python3.11.patch
new file mode 100644 (file)
index 0000000..ecc9936
--- /dev/null
@@ -0,0 +1,28 @@
+Description: skip tests bound to fail past python3.11.
+ Thanks John Marshall and Graham Inggs for the independent suggestion.
+Author: Étienne Mollier <emollier@debian.org>
+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
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- python-pysam.orig/tests/AlignmentFilePileup_test.py
++++ python-pysam/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 @@
+     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.'''
index 43ee38595c16e3f1c81ef0d1514da8ca9eb787f0..3e2bcd08650b314d3af6a40a35fa48dadf334b88 100644 (file)
@@ -1,3 +1,4 @@
 skip_test_remote.patch
 clean_less
 skip-test-on-32-bit.patch
+disable-tests-python3.11.patch