Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setUp(self):
self.img = image.load(tif_path)
self.dcm = image.load(dcm_path)
array = np.arange(42).reshape(6, 7)
self.arr = image.load(array)
def setUp(self):
self.img = image.load(tif_path)
self.dcm = image.load(dcm_path)
array = np.arange(42).reshape(6, 7)
self.arr = image.load(array)
def test_load_array(self):
arr = np.arange(36).reshape(6, 6)
img = image.load(arr)
self.assertIsInstance(img, ArrayImage)
def file_should_be_processed(self, filepath):
"""Decision of whether file should be run. Returns boolean."""
try:
image.load(filepath)
return True
except:
return False