[med-svn] [python-pysam] 08/08: Remove tests relying on online connection from test suite

Andreas Tille tille at debian.org
Tue Jul 21 09:49:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository python-pysam.

commit 187f5cc127a79f6a547511bb7a894b5080180fb9
Author: Andreas Tille <tille at debian.org>
Date:   Tue Jul 21 11:48:54 2015 +0200

    Remove tests relying on online connection from test suite
---
 debian/changelog                        |  8 +++-
 debian/patches/series                   |  1 +
 debian/patches/strip_online_tests.patch | 82 +++++++++++++++++++++++++++++++++
 3 files changed, 89 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8c9cb7a..819e0cd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,16 @@
-python-pysam (0.8.3+ds1-2) UNRELEASED; urgency=medium
+python-pysam (0.8.3+ds1-3) UNRELEASED; urgency=medium
 
+  [ Afif Elghraoui ]
   * Team upload.
   * Improve python3 compatibility for upstream test sources
   * Refresh older patches
   * Fix autopkgtests
   * Do not provide test data package
 
- -- Afif Elghraoui <afif at ghraoui.name>  Sat, 11 Jul 2015 01:02:16 -0700
+  [ Andreas Tille ]
+  * Remove tests relying on online connection from test suite
+
+ -- Andreas Tille <tille at debian.org>  Tue, 21 Jul 2015 11:48:37 +0200
 
 python-pysam (0.8.3+ds1-1) experimental; urgency=medium
 
diff --git a/debian/patches/series b/debian/patches/series
index 951529b..55ab446 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ correct-spelling-errors.patch
 ignore-htslib-dir.patch
 improve-python3-compatibility.patch
 sam_mpileup.patch
+strip_online_tests.patch
diff --git a/debian/patches/strip_online_tests.patch b/debian/patches/strip_online_tests.patch
new file mode 100644
index 0000000..c2bc21f
--- /dev/null
+++ b/debian/patches/strip_online_tests.patch
@@ -0,0 +1,82 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Tue, 21 Jul 2015 11:39:00 +0200
+Description: Remove tests relying on online connection from test suite
+
+--- a/tests/AlignmentFile_test.py
++++ b/tests/AlignmentFile_test.py
+@@ -1730,49 +1730,6 @@ class TestRemoteFileFTP(unittest.TestCas
+         self.assertEqual(len(result), 36)
+ 
+ 
+-class TestRemoteFileHTTP(unittest.TestCase):
+-
+-    url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/ex1.bam"
+-    region = "chr1:1-1000"
+-    local = os.path.join(DATADIR, "ex1.bam")
+-
+-    def testView(self):
+-        if not checkURL(self.url):
+-            return
+-
+-        samfile_local = pysam.AlignmentFile(self.local, "rb")
+-        ref = list(samfile_local.fetch(region=self.region))
+-
+-        result = pysam.view(self.url, self.region)
+-        self.assertEqual(len(result), len(ref))
+-
+-    def testFetch(self):
+-        if not checkURL(self.url):
+-            return
+-
+-        samfile = pysam.AlignmentFile(self.url, "rb")
+-        result = list(samfile.fetch(region=self.region))
+-        samfile_local = pysam.AlignmentFile(self.local, "rb")
+-        ref = list(samfile_local.fetch(region=self.region))
+-
+-        self.assertEqual(len(ref), len(result))
+-        for x, y in zip(result, ref):
+-            self.assertEqual(x.compare(y), 0)
+-
+-    def testFetchAll(self):
+-        if not checkURL(self.url):
+-            return
+-
+-        samfile = pysam.AlignmentFile(self.url, "rb")
+-        result = list(samfile.fetch())
+-        samfile_local = pysam.AlignmentFile(self.local, "rb")
+-        ref = list(samfile_local.fetch())
+-
+-        self.assertEqual(len(ref), len(result))
+-        for x, y in zip(result, ref):
+-            self.assertEqual(x.compare(y), 0)
+-
+-
+ class TestLargeOptValues(unittest.TestCase):
+ 
+     ints = (65536, 214748, 2147484, 2147483647)
+--- a/tests/tabix_test.py
++++ b/tests/tabix_test.py
+@@ -927,23 +927,6 @@ for vcf_file in vcf_files:
+ ############################################################################
+ 
+ 
+-class TestRemoteFileHTTP(unittest.TestCase):
+-
+-    url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example_htslib.gtf.gz"
+-    region = "chr1:1-1000"
+-    local = os.path.join(DATADIR, "example.gtf.gz")
+-
+-    def testFetchAll(self):
+-        remote_file = pysam.TabixFile(self.url, "r")
+-        remote_result = list(remote_file.fetch())
+-        local_file = pysam.TabixFile(self.local, "r")
+-        local_result = list(local_file.fetch())
+-
+-        self.assertEqual(len(remote_result), len(local_result))
+-        for x, y in zip(remote_result, local_result):
+-            self.assertEqual(x, y)
+-
+-
+ class TestIndexArgument(unittest.TestCase):
+ 
+     filename_src = os.path.join(DATADIR, "example.vcf.gz")

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-pysam.git



More information about the debian-med-commit mailing list