Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions test/test_client_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ def testSupportedFormatChecking(self):
This test is run only on local files to avoid downloading and removing a new file.
"""

for format, location in self.local.items():
if format != 'unsupported':
for file_format, location in self.local.items():
if file_format != 'unsupported':
# Tests the behavior after receiving supported file types with and without the 'file://' prefix
self.assertEquals(wf_info(location), self.expected[format])
self.assertEquals(wf_info(location[7:]), self.expected[format])
self.assertEquals(wf_info(location), self.expected[file_format])
self.assertEquals(wf_info(location[7:]), self.expected[file_format])

else:
# Tests behavior after recieveing a non supported file type.
# Tests behavior after receiving a non supported file type.
with self.assertRaises(TypeError):
wf_info(location)

Expand All @@ -79,20 +79,20 @@ def testFileLocationChecking(self):
This test needs to be run on remote files to test the location checking functionality of wf_info().
"""

for format, location in self.remote.items():
if format == 'unsupported':
for file_format, location in self.remote.items():
if file_format == 'unsupported':
# Tests behavior after receiving a file hosted at an unsupported location.
with self.assertRaises(NotImplementedError):
wf_info(location)

elif format == 'unreachable':
elif file_format == 'unreachable':
# Tests behavior after receiving a non-existent file.
with self.assertRaises(IOError):
wf_info(location)

else:
self.assertEquals(wf_info(location), self.expected[format])
self.assertFalse(os.path.isfile(os.path.join(os.getcwd(), 'fetchedFromRemote.' + format)))
self.assertEquals(wf_info(location), self.expected[file_format])
self.assertFalse(os.path.isfile(os.path.join(os.getcwd(), 'fetchedFromRemote.' + file_format)))


if __name__ == '__main__':
Expand Down
4 changes: 4 additions & 0 deletions test/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
import signal
import shutil
import logging
import sys

pkg_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) # noqa
sys.path.insert(0, pkg_root) # noqa

from wes_client.util import WESClient

Expand Down