Debian Codegraph @

debian/patches/skip_test_remote.patch

raw symbols SCIP
1 Author: Andreas Tille <[email protected]>
2 Last-Update: 2018-09-11
3 Description: Skip tests trying to access remote site
4 Forwarded: not-needed
5
6 --- python-pysam.orig/tests/AlignmentFile_test.py
7 +++ python-pysam/tests/AlignmentFile_test.py
8 @@ -497,17 +497,6 @@
9 "tmp_ex2.sam",
10 "rb", "wh")
11
12 - def testBAM2CRAM(self):
13 - # ignore header (md5 sum)
14 - self.checkEcho("ex2.bam",
15 - "ex2.cram",
16 - "tmp_ex2.cram",
17 - "rb", "wc",
18 - sequence_filename=os.path.join(BAM_DATADIR, "ex1.fa"),
19 - checkf=partial(
20 - check_samtools_view_equal,
21 - without_header=True))
22 -
23 def testCRAM2BAM(self):
24 # ignore header (md5 sum)
25 self.checkEcho("ex2.cram",
26 @@ -1633,6 +1622,7 @@
27 reference_filename = os.path.join(BAM_DATADIR, 'ex1.fa')
28
29
30 [email protected]
31 class TestRemoteFileFTP(unittest.TestCase):
32
33 '''test remote access.
34 --- python-pysam.orig/tests/tabix_test.py
35 +++ python-pysam/tests/tabix_test.py
36 @@ -1013,6 +1013,7 @@
37 globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,))
38
39
40 [email protected]
41 class TestRemoteFileHTTP(unittest.TestCase):
42
43 url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example.gtf.gz"
44 @@ -1052,25 +1053,28 @@
45 self.assertEqual(list(self.local_file.header), [])
46
47
48 -class TestRemoteFileHTTPWithHeader(TestRemoteFileHTTP):
49 -
50 - url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example_comments.gtf.gz"
51 - region = "chr1:1-1000"
52 - local = os.path.join(TABIX_DATADIR, "example_comments.gtf.gz")
53 -
54 - def setUp(self):
55 - if not getattr(pysam.config, "HAVE_LIBCURL", 0) or not check_url(self.url):
56 - self.remote_file = None
57 - else:
58 - self.remote_file = pysam.TabixFile(self.url, "r")
59 - self.local_file = pysam.TabixFile(self.local, "r")
60 -
61 - def testHeader(self):
62 - if self.remote_file is None:
63 - return
64 -
65 - self.assertEqual(list(self.local_file.header), ["# comment at start"])
66 - self.assertEqual(list(self.local_file.header), self.remote_file.header)
67 +#@unittest.skip # this leads to
68 + # E TypeError: Error when calling the metaclass bases
69 + # E function() argument 1 must be code, not str
70 +#class TestRemoteFileHTTPWithHeader(TestRemoteFileHTTP):
71 +#
72 +# url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example_comments.gtf.gz"
73 +# region = "chr1:1-1000"
74 +# local = os.path.join(TABIX_DATADIR, "example_comments.gtf.gz")
75 +#
76 +# def setUp(self):
77 +# if not getattr(pysam.config, "HAVE_LIBCURL", 0) or not check_url(self.url):
78 +# self.remote_file = None
79 +# else:
80 +# self.remote_file = pysam.TabixFile(self.url, "r")
81 +# self.local_file = pysam.TabixFile(self.local, "r")
82 +#
83 +# def testHeader(self):
84 +# if self.remote_file is None:
85 +# return
86 +#
87 +# self.assertEqual(list(self.local_file.header), ["# comment at start"])
88 +# self.assertEqual(list(self.local_file.header), self.remote_file.header)
89
90
91 class TestIndexArgument(unittest.TestCase):