File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1
1
language : python
2
2
python :
3
3
- ' 2.7'
4
+ - ' 3.5'
5
+ - ' 3.6'
6
+ - ' 3.7'
4
7
before_install :
5
8
- sudo apt-get update -qq
6
9
- pip install toil[all]==3.17.0
Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ def testSupportedFormatChecking(self):
64
64
for file_format , location in self .local .items ():
65
65
if file_format != 'unsupported' :
66
66
# Tests the behavior after receiving supported file types with and without the 'file://' prefix
67
- self .assertEquals (wf_info (location ), self .expected [file_format ])
68
- self .assertEquals (wf_info (location [7 :]), self .expected [file_format ])
67
+ self .assertEqual (wf_info (location ), self .expected [file_format ])
68
+ self .assertEqual (wf_info (location [7 :]), self .expected [file_format ])
69
69
70
70
else :
71
71
# Tests behavior after receiving a non supported file type.
@@ -91,7 +91,7 @@ def testFileLocationChecking(self):
91
91
wf_info (location )
92
92
93
93
else :
94
- self .assertEquals (wf_info (location ), self .expected [file_format ])
94
+ self .assertEqual (wf_info (location ), self .expected [file_format ])
95
95
self .assertFalse (os .path .isfile (os .path .join (os .getcwd (), 'fetchedFromRemote.' + file_format )))
96
96
97
97
Original file line number Diff line number Diff line change 5
5
import yaml
6
6
import glob
7
7
import requests
8
- import urllib
9
8
import logging
10
9
11
10
from wes_service .util import visit
12
- from urllib import urlopen
11
+
12
+ from future .standard_library import hooks
13
+
14
+ with hooks ():
15
+ from urllib .request import urlopen , pathname2url
13
16
14
17
15
18
def two_seven_compatible (filePath ):
@@ -56,7 +59,7 @@ def wf_info(workflow_path):
56
59
html = urlopen (workflow_path ).read ()
57
60
local_loc = os .path .join (os .getcwd (), 'fetchedFromRemote.' + file_type )
58
61
with open (local_loc , 'w' ) as f :
59
- f .write (html )
62
+ f .write (html . decode () )
60
63
version = wf_info ('file://' + local_loc )[0 ] # Don't take the file_type here, found it above.
61
64
os .remove (local_loc ) # TODO: Find a way to avoid recreating file before version determination.
62
65
else :
@@ -86,7 +89,7 @@ def fixpaths(d):
86
89
if "path" in d :
87
90
if ":" not in d ["path" ]:
88
91
local_path = os .path .normpath (os .path .join (os .getcwd (), basedir , d ["path" ]))
89
- d ["location" ] = urllib . pathname2url (local_path )
92
+ d ["location" ] = pathname2url (local_path )
90
93
else :
91
94
d ["location" ] = d ["path" ]
92
95
del d ["path" ]
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ def collect_attachments(self, run_id=None):
67
67
content = v .read ()
68
68
body [k ] = json .loads (content )
69
69
else :
70
- body [k ] = v .read ()
70
+ body [k ] = v .read (). decode ()
71
71
72
72
if ":" not in body ["workflow_url" ]:
73
73
body ["workflow_url" ] = "file://%s" % os .path .join (tempdir , secure_filename (body ["workflow_url" ]))
You can’t perform that action at this time.
0 commit comments