Remove tests relying on online connection from test suite
authorAndreas Tille <tille@debian.org>
Tue, 21 Jul 2015 09:48:54 +0000 (11:48 +0200)
committerAndreas Tille <tille@debian.org>
Tue, 21 Jul 2015 09:48:54 +0000 (11:48 +0200)
debian/changelog
debian/patches/series
debian/patches/strip_online_tests.patch [new file with mode: 0644]

index 8c9cb7a8308a369fb13c5f3d0ca4236269297a63..819e0cd7ade1ec0b240b8109ab0b153b6125d6bd 100644 (file)
@@ -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@ghraoui.name>  Sat, 11 Jul 2015 01:02:16 -0700
+  [ Andreas Tille ]
+  * Remove tests relying on online connection from test suite
+
+ -- Andreas Tille <tille@debian.org>  Tue, 21 Jul 2015 11:48:37 +0200
 
 python-pysam (0.8.3+ds1-1) experimental; urgency=medium
 
index 951529b3a75f5ffbe935ecc9992f6c8bfb8a24d5..55ab44674bf956d0dbf49e43ab55a223c491bc55 100644 (file)
@@ -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 (file)
index 0000000..c2bc21f
--- /dev/null
@@ -0,0 +1,82 @@
+Author: Andreas Tille <tille@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")