@@ -18,6 +18,22 @@ class IntegrationTest(unittest.TestCase):
18
18
def setUp (self ):
19
19
dirname , filename = os .path .split (os .path .abspath (__file__ ))
20
20
self .testdata_dir = dirname + 'data'
21
+ self .local = {'cwl' : 'file://' + os .path .join (os .getcwd () + '/testdata/md5sum.cwl' ),
22
+ 'wdl' : 'file://' + os .path .join (os .getcwd () + '/testdata/md5sum.wdl' ),
23
+ 'py' : 'file://' + os .path .join (os .getcwd () + '/test/test_integration.py' ),
24
+ 'unsupported' : 'fake.txt' }
25
+
26
+ self .remote = {
27
+ 'cwl' : 'https://raw.githubusercontent.com/common-workflow-language/workflow-service/master/testdata/md5sum.cwl' ,
28
+ 'wdl' : 'https://raw.githubusercontent.com/common-workflow-language/workflow-service/master/testdata/md5sum.wdl' ,
29
+ 'py' : 'https://raw.githubusercontent.com/common-workflow-language/workflow-service/master/test/test_integration.py' ,
30
+ 'unsupported' : 'gs://topmed_workflow_testing/topmed_aligner/small_test_files_sbg/example_human_known_snp.py' ,
31
+ 'unreachable' : 'https://fake.py' }
32
+
33
+ self .expected = {'cwl' : ('v1.0' , 'CWL' ),
34
+ 'wdl' : ('draft-2' , 'WDL' ),
35
+ 'py' : ('2.7' , 'PY' ),
36
+ 'pyWithPrefix' : ('2.7' , 'PY' )}
21
37
22
38
def tearDown (self ):
23
39
unittest .TestCase .tearDown (self )
@@ -38,25 +54,6 @@ def test_expand_globs(self):
38
54
glob_files = expand_globs ('*' )
39
55
assert set (files ) == glob_files , '\n ' + str (set (files )) + '\n ' + str (glob_files )
40
56
41
-
42
- class WorkflowInfoTest (unittest .TestCase ):
43
-
44
- local = {'cwl' : 'file://' + os .path .join (os .getcwd () + '/testdata/md5sum.cwl' ),
45
- 'wdl' : 'file://' + os .path .join (os .getcwd () + '/testdata/md5sum.wdl' ),
46
- 'py' : 'file://' + os .path .join (os .getcwd () + '/test/test_integration.py' ),
47
- 'unsupported' : 'fake.txt' }
48
-
49
- remote = {'cwl' : 'https://raw.githubusercontent.com/common-workflow-language/workflow-service/master/testdata/md5sum.cwl' ,
50
- 'wdl' : 'https://raw.githubusercontent.com/common-workflow-language/workflow-service/master/testdata/md5sum.wdl' ,
51
- 'py' : 'https://raw.githubusercontent.com/common-workflow-language/workflow-service/master/test/test_integration.py' ,
52
- 'unsupported' : 'gs://topmed_workflow_testing/topmed_aligner/small_test_files_sbg/example_human_known_snp.py' , # TODO: find real external file of .py, .cwl, .wdl
53
- 'unreachable' : 'https://fake.py' }
54
-
55
- expected = {'cwl' : ('v1.0' , 'CWL' ),
56
- 'wdl' : ('draft-2' , 'WDL' ),
57
- 'py' : ('2.7' , 'PY' ),
58
- 'pyWithPrefix' : ('2.7' , 'PY' )}
59
-
60
57
def testSupportedFormatChecking (self ):
61
58
"""
62
59
Check that non-wdl, -python, -cwl files are rejected.
@@ -97,5 +94,6 @@ def testFileLocationChecking(self):
97
94
self .assertEquals (wf_info (location ), self .expected [format ])
98
95
self .assertFalse (os .path .isfile (os .path .join (os .getcwd (), 'fetchedFromRemote.' + format )))
99
96
97
+
100
98
if __name__ == '__main__' :
101
99
unittest .main () # run all tests
0 commit comments