Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_load_file_object(self):
od = canopen.import_od(open(EDS_PATH))
self.assertTrue(len(od) > 0)
def setUp(self):
self.od = canopen.import_od(EDS_PATH, 2)
def test_load_nonexisting_file(self):
with self.assertRaises(IOError):
canopen.import_od('/path/to/wrong_file.eds')