+++ /dev/null
-Description: Disable tests requiring network access
-Author: Afif Elghraoui <afif@ghraoui.name>
-Forwarded: no
-Last-Update: 2015-11-13
---- python-pysam.orig/tests/tabix_test.py
-+++ python-pysam/tests/tabix_test.py
-@@ -1124,11 +1124,12 @@
- local = os.path.join(DATADIR, "example.gtf.gz")
-
- def setUp(self):
-- self.remote_file = pysam.TabixFile(self.url, "r")
-+ if checkURL(self.url):
-+ self.remote_file = pysam.TabixFile(self.url, "r")
- self.local_file = pysam.TabixFile(self.local, "r")
-
- def testFetchAll(self):
-- if not checkURL(self.url):
-+ if checkURL(self.url) == False:
- return
-
- remote_result = list(self.remote_file.fetch())
-@@ -1139,14 +1140,15 @@
- self.assertEqual(x, y)
-
- def testHeader(self):
-- self.assertEqual(list(self.local_file.header), [])
-- self.assertRaises(AttributeError,
-- getattr,
-- self.remote_file,
-- "header")
-+ if checkURL(self.url):
-+ self.assertEqual(list(self.local_file.header), [])
-+ self.assertRaises(AttributeError,
-+ getattr,
-+ self.remote_file,
-+ "header")
-
- def tearDown(self):
-- self.remote_file.close()
-+# self.remote_file.close()
- self.local_file.close()
-
-
---- python-pysam.orig/tests/AlignmentFile_test.py
-+++ python-pysam/tests/AlignmentFile_test.py
-@@ -2466,12 +2466,16 @@
- filepath_index=os.path.join(DATADIR, 'ex1.cram.crai'))
-
- def testRemoteExplicitIndexBAM(self):
-- samfile = pysam.AlignmentFile(
-- "http://genserv.anat.ox.ac.uk/downloads/pysam/test/noindex.bam",
-- "rb",
-- filepath_index=os.path.join(DATADIR, 'ex1.bam.bai'))
-+ url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/noindex.bam"
-+ if checkURL(url):
-+ samfile = pysam.AlignmentFile(
-+ url,
-+ "rb",
-+ filepath_index=os.path.join(DATADIR, 'ex1.bam.bai'))
-
-- samfile.fetch("chr1")
-+ samfile.fetch("chr1")
-+ else:
-+ pass
-
-
- class TestVerbosity(unittest.TestCase):
---- python-pysam.orig/tests/faidx_test.py
-+++ python-pysam/tests/faidx_test.py
-@@ -173,12 +173,13 @@
-
-
- def testFTPView(self):
-- if not checkURL(self.url):
-- return
-- f = pysam.Fastafile(self.url)
-- self.assertEqual(
-- len(f.fetch("chr1", 0, 1000)),
-- 1000)
-+ if checkURL(self.url):
-+ f = pysam.Fastafile(self.url)
-+ self.assertEqual(
-+ len(f.fetch("chr1", 0, 1000)),
-+ 1000)
-+ else:
-+ return True
-
-
- if __name__ == "__main__":