mirror of https://github.com/MISP/PyMISP
TST: skip test with optional files if not existing
parent
d59e70ce84
commit
0790e571a1
|
@ -233,9 +233,12 @@ class TestOffline(unittest.TestCase):
|
|||
|
||||
def test_objects(self, m):
|
||||
paths = ['cmd.exe', 'tmux', 'MachO-OSX-x64-ls']
|
||||
for path in paths:
|
||||
json_blob = self.make_objects(os.path.join('tests',
|
||||
'viper-test-files', 'test_files', path))
|
||||
try:
|
||||
for path in paths:
|
||||
json_blob = self.make_objects(os.path.join('tests',
|
||||
'viper-test-files', 'test_files', path))
|
||||
except IOError: # Can be replaced with FileNotFoundError when support for python 2 is dropped
|
||||
return unittest.SkipTest()
|
||||
print(json_blob)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in New Issue