File: skip_test_remote.patch

package info (click to toggle)
python-pysam 0.23.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,464 kB
  • sloc: ansic: 158,947; python: 8,806; makefile: 264; sh: 79
file content (91 lines) | stat: -rw-r--r-- 3,269 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Author: Andreas Tille <tille@debian.org>
Last-Update: 2018-09-11
Description: Skip tests trying to access remote site
Forwarded: not-needed

--- python-pysam.orig/tests/AlignmentFile_test.py
+++ python-pysam/tests/AlignmentFile_test.py
@@ -497,17 +497,6 @@
                        "tmp_ex2.sam",
                        "rb", "wh")
 
-    def testBAM2CRAM(self):
-        # ignore header (md5 sum)
-        self.checkEcho("ex2.bam",
-                       "ex2.cram",
-                       "tmp_ex2.cram",
-                       "rb", "wc",
-                       sequence_filename=os.path.join(BAM_DATADIR, "ex1.fa"),
-                       checkf=partial(
-                           check_samtools_view_equal,
-                           without_header=True))
-
     def testCRAM2BAM(self):
         # ignore header (md5 sum)
         self.checkEcho("ex2.cram",
@@ -1633,6 +1622,7 @@
     reference_filename = os.path.join(BAM_DATADIR, 'ex1.fa')
 
 
+@unittest.skip
 class TestRemoteFileFTP(unittest.TestCase):
 
     '''test remote access.
--- python-pysam.orig/tests/tabix_test.py
+++ python-pysam/tests/tabix_test.py
@@ -1013,6 +1013,7 @@
     globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,))
 
 
+@unittest.skip
 class TestRemoteFileHTTP(unittest.TestCase):
 
     url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example.gtf.gz"
@@ -1052,25 +1053,28 @@
         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 getattr(pysam.config, "HAVE_LIBCURL", 0) or not check_url(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)
+#@unittest.skip  #  this leads to
+                 #  E   TypeError: Error when calling the metaclass bases
+                 #  E       function() argument 1 must be code, not str
+#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 getattr(pysam.config, "HAVE_LIBCURL", 0) or not check_url(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):