From 5ba04e28410af0197d473c6b429a1919a67dc00e Mon Sep 17 00:00:00 2001 From: Andreas Tille Date: Sat, 17 Feb 2018 14:50:47 +0100 Subject: [PATCH] Update patches and exclude tests using http access --- debian/changelog | 7 ++ .../exclude_tests_accessing_remote_http.patch | 71 +------------------ debian/patches/xfail.patch | 6 +- debian/rules | 3 + 4 files changed, 14 insertions(+), 73 deletions(-) diff --git a/debian/changelog b/debian/changelog index ccfc64a..b285109 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-pysam (0.14+ds-1) UNRELEASED; urgency=medium + + * New upstream version + * d/rules: Exclude tests using http access + + -- Andreas Tille Sat, 17 Feb 2018 14:44:29 +0100 + python-pysam (0.13.0+ds-1) unstable; urgency=medium * New upstream version diff --git a/debian/patches/exclude_tests_accessing_remote_http.patch b/debian/patches/exclude_tests_accessing_remote_http.patch index 1377946..09c25ec 100644 --- a/debian/patches/exclude_tests_accessing_remote_http.patch +++ b/debian/patches/exclude_tests_accessing_remote_http.patch @@ -72,7 +72,7 @@ Description: Exclude tests trying to access remote http sites and thus need ints = ( 65536, 214748, 2147484, 2147483647 ) --- a/tests/AlignmentFile_test.py +++ b/tests/AlignmentFile_test.py -@@ -1893,81 +1893,6 @@ class TestDoubleFetchCRAMWithReference(T +@@ -1559,81 +1559,6 @@ class TestDoubleFetchCRAMWithReference(T reference_filename = os.path.join(BAM_DATADIR, 'ex1.fa') @@ -154,72 +154,3 @@ Description: Exclude tests trying to access remote http sites and thus need class TestLargeOptValues(unittest.TestCase): ints = (65536, 214748, 2147484, 2147483647) ---- a/tests/tabix_test.py -+++ b/tests/tabix_test.py -@@ -1033,66 +1033,6 @@ for vcf_file in vcf_files: - globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,)) - - --class TestRemoteFileHTTP(unittest.TestCase): -- -- url = "http://www.cgat.org/downloads/public/pysam/test/example.gtf.gz" -- region = "chr1:1-1000" -- local = os.path.join(TABIX_DATADIR, "example.gtf.gz") -- -- def setUp(self): -- if not pysam.config.HAVE_LIBCURL or not checkURL(self.url): -- self.remote_file = None -- else: -- self.remote_file = pysam.TabixFile(self.url, "r") -- -- self.local_file = pysam.TabixFile(self.local, "r") -- -- def tearDown(self): -- if self.remote_file is None: -- return -- -- self.remote_file.close() -- self.local_file.close() -- -- def testFetchAll(self): -- if self.remote_file is None: -- return -- -- remote_result = list(self.remote_file.fetch()) -- local_result = list(self.local_file.fetch()) -- -- self.assertEqual(len(remote_result), len(local_result)) -- for x, y in zip(remote_result, local_result): -- self.assertEqual(x, y) -- -- def testHeader(self): -- if self.remote_file is None: -- return -- -- self.assertEqual(list(self.local_file.header), []) -- -- --class TestRemoteFileHTTPWithHeader(TestRemoteFileHTTP): -- -- url = "http://www.cgat.org/downloads/public/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 checkURL(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): - - filename_src = os.path.join(TABIX_DATADIR, "example.vcf.gz") diff --git a/debian/patches/xfail.patch b/debian/patches/xfail.patch index 15c77fe..40fb7b9 100644 --- a/debian/patches/xfail.patch +++ b/debian/patches/xfail.patch @@ -5,11 +5,11 @@ Forwarded: not-needed Last-Update: 2017-10-01 --- a/tests/AlignmentFile_test.py +++ b/tests/AlignmentFile_test.py -@@ -521,6 +521,7 @@ class TestIO(unittest.TestCase): +@@ -474,6 +474,7 @@ class TestIO(unittest.TestCase): "tmp_ex2.bam", "rb", "wb") + @unittest.skip def testCRAM2CRAM(self): - self.checkEcho("ex2.cram", - "ex2.cram", + # 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 cb44816..d5ebb44 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,9 @@ HTSLIBDIR := /usr/lib/$(DEB_HOST_MULTIARCH) export HTSLIB_LIBRARY_DIR=$(HTSLIBDIR) export HTSLIB_INCLUDE_DIR=/usr/include +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 -- 2.30.2