| 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 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 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 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 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): |