Update patches
authorAfif Elghraoui <afif@debian.org>
Sun, 22 Apr 2018 22:36:25 +0000 (18:36 -0400)
committerAfif Elghraoui <afif@debian.org>
Sun, 22 Apr 2018 23:02:29 +0000 (19:02 -0400)
debian/patches/exclude_tests_accessing_remote_http.patch [deleted file]
debian/patches/series
debian/patches/skip_test_needing_missing_data.patch

diff --git a/debian/patches/exclude_tests_accessing_remote_http.patch b/debian/patches/exclude_tests_accessing_remote_http.patch
deleted file mode 100644 (file)
index 6f5fa65..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-Author: Andreas Tille <tille@debian.org>
-Last-Update: Wed, 13 Dec 2017 13:03:50 +0100
-Description: Exclude tests trying to access remote http sites and thus need
- to fail in a chroot without network access.
- .
- Remark: Any more elegant method than dumb removal to exclude the tests would
- be welcome.
-
---- a/save/pysam_test2.6.py
-+++ b/save/pysam_test2.6.py
-@@ -1284,61 +1284,6 @@ class TestDoubleFetch(unittest.TestCase)
-                        samfile1.fetch( until_eof = True )):
-             self.assertEqual( a.compare( b), 0 )
--class TestRemoteFileFTP(unittest.TestCase):
--    '''test remote access.
--
--    '''
--
--    # Need to find an ftp server without password on standard
--    # port.
--
--    url = "ftp://ftp.sanger.ac.uk/pub/rd/humanSequences/CV.bam"
--    region = "1:1-1000"
--
--    def testFTPView( self ):
--        return
--        result = pysam.view( self.url, self.region )
--        self.assertEqual( len(result), 36 )
--        
--    def testFTPFetch( self ):
--        return
--        samfile = pysam.Samfile(self.url, "rb")  
--        result = list(samfile.fetch( region = self.region ))
--        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 = "ex1.bam"
--
--    def testView( self ):
--        samfile_local = pysam.Samfile(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 ):
--        samfile = pysam.Samfile(self.url, "rb")  
--        result = list(samfile.fetch( region = self.region ))
--        samfile_local = pysam.Samfile(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 ):
--        samfile = pysam.Samfile(self.url, "rb")  
--        result = list(samfile.fetch())
--        samfile_local = pysam.Samfile(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/AlignmentFile_test.py
-+++ b/tests/AlignmentFile_test.py
-@@ -1559,81 +1559,6 @@ class TestDoubleFetchCRAMWithReference(T
-     reference_filename = os.path.join(BAM_DATADIR, 'ex1.fa')
--class TestRemoteFileFTP(unittest.TestCase):
--
--    '''test remote access.
--
--    '''
--
--    # Need to find an ftp server without password on standard
--    # port.
--
--    url = "ftp://ftp.sanger.ac.uk/pub/rd/humanSequences/CV.bam"
--    region = "1:1-1000"
--
--    def testFTPView(self):
--        return
--        if not checkURL(self.url):
--            return
--
--        result = pysam.samtools.view(self.url, self.region)
--        self.assertEqual(len(result), 36)
--
--    def testFTPFetch(self):
--        return
--        if not checkURL(self.url):
--            return
--
--        samfile = pysam.AlignmentFile(self.url, "rb")
--        result = list(samfile.fetch(region=self.region))
--        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(BAM_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.samtools.view(self.url, self.region)
--        self.assertEqual(len(result.splitlines()), len(ref))
--
--    def testFetch(self):
--        if not checkURL(self.url):
--            return
--
--        with pysam.AlignmentFile(self.url, "rb") as samfile:
--            result = list(samfile.fetch(region=self.region))
--
--        with pysam.AlignmentFile(self.local, "rb") as samfile_local:
--            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
--
--        with pysam.AlignmentFile(self.url, "rb") as samfile:
--            result = list(samfile.fetch())
--
--        with pysam.AlignmentFile(self.local, "rb") as samfile_local:
--            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
-@@ -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")
index 97110d91d3f2e66b30ad82d38038e71aedcce3c4..881b73d7594bcb20a3285c7f369718fe718e5d38 100644 (file)
@@ -1,4 +1,3 @@
 execute-linking-tests-only-when-explicitely-reque.patch
 xfail.patch
-exclude_tests_accessing_remote_http.patch
 skip_test_needing_missing_data.patch
index 689f5ff47ae3f534cda491520e1640a9a38c7438..9673e16f22d5ee9b7de1306395facec05acebe5a 100644 (file)
@@ -4,9 +4,9 @@ Author: Andreas Tille <tille@debian.org>
 Last-Update: Sat, 17 Feb 2018 15:24:34 +0100
 Forwarded: https://github.com/pysam-developers/pysam/issues/626
 
---- a/tests/pysam_data/Makefile
-+++ b/tests/pysam_data/Makefile
-@@ -20,8 +20,7 @@ all: ex1.pileup.gz \
+--- python-pysam.orig/tests/pysam_data/Makefile
++++ python-pysam/tests/pysam_data/Makefile
+@@ -20,8 +20,7 @@
        explicit_index.bam explicit_index.cram \
        faidx_empty_seq.fq.gz \
        ex1.fa.gz ex1.fa.gz.csi \
@@ -16,9 +16,9 @@ Forwarded: https://github.com/pysam-developers/pysam/issues/626
  
  # 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)
+--- python-pysam.orig/tests/AlignmentFile_test.py
++++ python-pysam/tests/AlignmentFile_test.py
+@@ -1359,12 +1359,7 @@
                                               'example_empty_header.bam'))
          self.assertEqual(s.header.to_dict(), {'SQ': [{'LN': 1000, 'SN': 'chr1'}]})