@@ -18,6 +18,22 @@ class IntegrationTest(unittest.TestCase):
1818 def setUp (self ):
1919 dirname , filename = os .path .split (os .path .abspath (__file__ ))
2020 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' )}
2137
2238 def tearDown (self ):
2339 unittest .TestCase .tearDown (self )
@@ -38,25 +54,6 @@ def test_expand_globs(self):
3854 glob_files = expand_globs ('*' )
3955 assert set (files ) == glob_files , '\n ' + str (set (files )) + '\n ' + str (glob_files )
4056
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-
6057 def testSupportedFormatChecking (self ):
6158 """
6259 Check that non-wdl, -python, -cwl files are rejected.
@@ -97,5 +94,6 @@ def testFileLocationChecking(self):
9794 self .assertEquals (wf_info (location ), self .expected [format ])
9895 self .assertFalse (os .path .isfile (os .path .join (os .getcwd (), 'fetchedFromRemote.' + format )))
9996
97+
10098if __name__ == '__main__' :
10199 unittest .main () # run all tests
0 commit comments