[med-svn] [Git][med-team/python-pysam][master] 3 commits: do not depend from non-existing data file in make test target
Andreas Tille
gitlab at salsa.debian.org
Sat Feb 17 20:35:50 UTC 2018
Andreas Tille pushed to branch master at Debian Med / python-pysam
Commits:
089b7cc4 by Andreas Tille at 2018-02-17T16:04:59+01:00
do not depend from non-existing data file in make test target
- - - - -
7d981166 by Andreas Tille at 2018-02-17T20:46:41+01:00
Restore old patch since the attempt to exclude tests more easily failed
- - - - -
933b6426 by Andreas Tille at 2018-02-17T21:29:46+01:00
Remove test that tries to access missing data file
- - - - -
5 changed files:
- debian/changelog
- debian/patches/exclude_tests_accessing_remote_http.patch
- debian/patches/series
- + debian/patches/skip_test_needing_missing_data.patch
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ python-pysam (0.14+ds-1) UNRELEASED; urgency=medium
* cme fix dpkg-control
* debhelper 11
* do not remove samtools/tmp_file.h in clean target
+ * do not depend from non-existing data file in make test target
-- Andreas Tille <tille at debian.org> Sat, 17 Feb 2018 15:24:34 +0100
=====================================
debian/patches/exclude_tests_accessing_remote_http.patch
=====================================
--- a/debian/patches/exclude_tests_accessing_remote_http.patch
+++ b/debian/patches/exclude_tests_accessing_remote_http.patch
@@ -154,3 +154,72 @@ 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
+@@ -1039,66 +1039,6 @@ for vcf_file in vcf_files:
+ globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,))
+
+
+-class TestRemoteFileHTTP(unittest.TestCase):
+-
+- url = "http://genserv.anat.ox.ac.uk/downloads/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://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 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")
=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
execute-linking-tests-only-when-explicitely-reque.patch
xfail.patch
exclude_tests_accessing_remote_http.patch
+skip_test_needing_missing_data.patch
=====================================
debian/patches/skip_test_needing_missing_data.patch
=====================================
--- /dev/null
+++ b/debian/patches/skip_test_needing_missing_data.patch
@@ -0,0 +1,32 @@
+Description: do not depend from non-existing data file in make test target
+ (There is no such file example_reverse_complement.bam)
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Sat, 17 Feb 2018 15:24:34 +0100
+
+--- a/tests/pysam_data/Makefile
++++ b/tests/pysam_data/Makefile
+@@ -20,8 +20,7 @@ all: ex1.pileup.gz \
+ explicit_index.bam explicit_index.cram \
+ faidx_empty_seq.fq.gz \
+ ex1.fa.gz ex1.fa.gz.csi \
+- ex1_csi.bam \
+- example_reverse_complement.bam
++ ex1_csi.bam
+
+ # ex2.sam - as ex1.sam, but with header
+ ex2.sam.gz: ex1.bam ex1.bam.bai
+--- a/tests/AlignmentFile_test.py
++++ b/tests/AlignmentFile_test.py
+@@ -1361,12 +1361,7 @@ class TestEmptyHeader(unittest.TestCase)
+ 'example_empty_header.bam'))
+ self.assertEqual(s.header.to_dict(), {'SQ': [{'LN': 1000, 'SN': 'chr1'}]})
+
+- def test_bam_without_seq_in_header(self):
+- s = pysam.AlignmentFile(os.path.join(BAM_DATADIR, "example_no_seq_in_header.bam"))
+- self.assertTrue("SQ" in s.header.to_dict())
+- self.assertTrue("@SQ" in str(s.header))
+
+-
+ class TestHeaderWithProgramOptions(unittest.TestCase):
+
+ '''see issue 39.'''
=====================================
debian/rules
=====================================
--- a/debian/rules
+++ b/debian/rules
@@ -15,8 +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
+# 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
%:
View it on GitLab: https://salsa.debian.org/med-team/python-pysam/compare/573a161da5f04049b8f8fb1faf176f4f14b0af83...933b6426545ae28f68fab60490fe3bc1376fdc8e
---
View it on GitLab: https://salsa.debian.org/med-team/python-pysam/compare/573a161da5f04049b8f8fb1faf176f4f14b0af83...933b6426545ae28f68fab60490fe3bc1376fdc8e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debian-med-commit/attachments/20180217/0b2df7bc/attachment-0001.html>
More information about the debian-med-commit
mailing list