From: Andreas Tille Date: Wed, 12 Sep 2018 14:53:40 +0000 (+0200) Subject: Adjust patches for failed tests X-Git-Tag: archive/raspbian/0.22.0+ds-1+rpi1~1^2^2~111 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=84eb0baf30ce2db15c457d6582da213ec69e1abe;p=python-pysam.git Adjust patches for failed tests --- diff --git a/debian/patches/execute-linking-tests-only-when-explicitely-reque.patch b/debian/patches/execute-linking-tests-only-when-explicitely-reque.patch deleted file mode 100644 index 9e12348..0000000 --- a/debian/patches/execute-linking-tests-only-when-explicitely-reque.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Andreas Heger -Date: Mon, 18 Sep 2017 11:19:28 +0100 -Bug-Debian: https://bugs.debian.org/871083 -Subject: execute linking tests only when explicitly - requested via PYSAM_LINKING_TESTS env var. Keep on travis. Fixes #534 - ---- - .travis.yml | 2 ++ - tests/TestUtils.py | 1 + - tests/linking_test.py | 10 ++++++++++ - 3 files changed, 13 insertions(+) - ---- a/.travis.yml -+++ b/.travis.yml -@@ -11,8 +11,6 @@ env: - - CONDA_PY=3.4 - - CONDA_PY=3.5 - - CONDA_PY=3.6 -- global: -- - PYSAM_LINKING_TEST=1 - - addons: - apt: diff --git a/debian/patches/series b/debian/patches/series index c2b6af4..c6285a7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,2 @@ -#execute-linking-tests-only-when-explicitely-reque.patch -#xfail.patch -#skip_test_needing_missing_data.patch +skip_test_needing_missing_data.patch +skip_test_remote.patch diff --git a/debian/patches/skip_test_remote.patch b/debian/patches/skip_test_remote.patch new file mode 100644 index 0000000..e088109 --- /dev/null +++ b/debian/patches/skip_test_remote.patch @@ -0,0 +1,72 @@ +Author: Andreas Tille +Last-Update: Tue, 11 Sep 2018 14:12:55 +0200 +Description: Skip tests trying to access remote site + +--- a/tests/AlignmentFile_test.py ++++ b/tests/AlignmentFile_test.py +@@ -1596,6 +1596,7 @@ class TestDoubleFetchCRAMWithReference(T + reference_filename = os.path.join(BAM_DATADIR, 'ex1.fa') + + ++@unittest.skip + class TestRemoteFileFTP(unittest.TestCase): + + '''test remote access. +--- a/tests/tabix_test.py ++++ b/tests/tabix_test.py +@@ -1039,6 +1039,7 @@ for vcf_file in vcf_files: + globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,)) + + ++@unittest.skip + class TestRemoteFileHTTP(unittest.TestCase): + + url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example.gtf.gz" +@@ -1078,25 +1079,28 @@ class TestRemoteFileHTTP(unittest.TestCa + self.assertEqual(list(self.local_file.header), []) + + +-class TestRemoteFileHTTPWithHeader(TestRemoteFileHTTP): +- +- url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example_comments.gtf.gz" +- region = "chr1:1-1000" +- local = os.path.join(TABIX_DATADIR, "example_comments.gtf.gz") +- +- def setUp(self): +- if not pysam.config.HAVE_LIBCURL or not check_url(self.url): +- self.remote_file = None +- else: +- self.remote_file = pysam.TabixFile(self.url, "r") +- self.local_file = pysam.TabixFile(self.local, "r") +- +- def testHeader(self): +- if self.remote_file is None: +- return +- +- self.assertEqual(list(self.local_file.header), ["# comment at start"]) +- self.assertEqual(list(self.local_file.header), self.remote_file.header) ++#@unittest.skip # this leads to ++ # E TypeError: Error when calling the metaclass bases ++ # E function() argument 1 must be code, not str ++#class TestRemoteFileHTTPWithHeader(TestRemoteFileHTTP): ++# ++# url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example_comments.gtf.gz" ++# region = "chr1:1-1000" ++# local = os.path.join(TABIX_DATADIR, "example_comments.gtf.gz") ++# ++# def setUp(self): ++# if not pysam.config.HAVE_LIBCURL or not check_url(self.url): ++# self.remote_file = None ++# else: ++# self.remote_file = pysam.TabixFile(self.url, "r") ++# self.local_file = pysam.TabixFile(self.local, "r") ++# ++# def testHeader(self): ++# if self.remote_file is None: ++# return ++# ++# self.assertEqual(list(self.local_file.header), ["# comment at start"]) ++# self.assertEqual(list(self.local_file.header), self.remote_file.header) + + + class TestIndexArgument(unittest.TestCase): diff --git a/debian/patches/xfail.patch b/debian/patches/xfail.patch deleted file mode 100644 index e549fec..0000000 --- a/debian/patches/xfail.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: temporarily skip failing test - See https://github.com/pysam-developers/pysam/issues/542 -Author: Afif Elghraoui -Forwarded: not-needed -Last-Update: 2017-10-01 -Index: python-pysam/tests/AlignmentFile_test.py -=================================================================== ---- python-pysam.orig/tests/AlignmentFile_test.py -+++ python-pysam/tests/AlignmentFile_test.py -@@ -472,6 +472,7 @@ class TestIO(unittest.TestCase): - "tmp_ex2.bam", - "rb", "wb") - -+ @unittest.skip - def testCRAM2CRAM(self): - # in some systems different reference sequence paths might be - # embedded in the CRAM files which will result in different headers diff --git a/debian/rules b/debian/rules index 1d9410d..f47200a 100755 --- a/debian/rules +++ b/debian/rules @@ -15,10 +15,6 @@ HTSLIBDIR := /usr/lib/$(DEB_HOST_MULTIARCH) export HTSLIB_LIBRARY_DIR=$(HTSLIBDIR) export HTSLIB_INCLUDE_DIR=/usr/include -# unfortunately this does not work - any hint to fix this would be really welcome -#export PYBUILD_TEST_ARGS_python2=-k-XTestRemoteFileHTTP -k-XTestRemoteFileHTTPWithHeader -#export PYBUILD_TEST_ARGS_python3=-k-XTestRemoteFileHTTP -k-XTestRemoteFileHTTPWithHeader - clean: clean-tests %: dh $@ --with python2,python3 --buildsystem=pybuild