File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed 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
11
13
12
from future .standard_library import hooks
14
13
15
14
with hooks ():
16
- from urllib .request import pathname2url
15
+ from urllib .request import urlopen , pathname2url
17
16
18
17
19
18
def two_seven_compatible (filePath ):
@@ -60,7 +59,7 @@ def wf_info(workflow_path):
60
59
html = urlopen (workflow_path ).read ()
61
60
local_loc = os .path .join (os .getcwd (), 'fetchedFromRemote.' + file_type )
62
61
with open (local_loc , 'w' ) as f :
63
- f .write (html )
62
+ f .write (html . decode () )
64
63
version = wf_info ('file://' + local_loc )[0 ] # Don't take the file_type here, found it above.
65
64
os .remove (local_loc ) # TODO: Find a way to avoid recreating file before version determination.
66
65
else :
@@ -90,7 +89,7 @@ def fixpaths(d):
90
89
if "path" in d :
91
90
if ":" not in d ["path" ]:
92
91
local_path = os .path .normpath (os .path .join (os .getcwd (), basedir , d ["path" ]))
93
- d ["location" ] = urllib . pathname2url (local_path )
92
+ d ["location" ] = pathname2url (local_path )
94
93
else :
95
94
d ["location" ] = d ["path" ]
96
95
del d ["path" ]
You can’t perform that action at this time.
0 commit comments