binman: Complete test coverage of comp_util
Drop the unused gzip code, update comments and add a test for an invalid algorithm. The temporary file is not needed now, so drop that also. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -5076,6 +5076,15 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
|
||||
self._DoBinman(*args)
|
||||
self.assertIn('failed to fetch with all methods', stdout.getvalue())
|
||||
|
||||
def testInvalidCompress(self):
|
||||
with self.assertRaises(ValueError) as e:
|
||||
comp_util.compress(b'', 'invalid')
|
||||
self.assertIn("Unknown algorithm 'invalid'", str(e.exception))
|
||||
|
||||
with self.assertRaises(ValueError) as e:
|
||||
comp_util.decompress(b'1234', 'invalid')
|
||||
self.assertIn("Unknown algorithm 'invalid'", str(e.exception))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Reference in New Issue
Block a user