13 rospy.init_node(
"test_compression")
16 bytes = list(range(128)) * 10000
17 string = str(bytearray(bytes))
18 encoded = pngcompression.encode(string)
19 self.assertNotEqual(string, encoded)
22 bytes = list(range(128)) * 10000
23 string = str(bytearray(bytes))
24 encoded = pngcompression.encode(string)
25 self.assertNotEqual(string, encoded)
26 decoded = pngcompression.decode(encoded)
27 self.assertEqual(string, decoded)
29 PKG =
'rosbridge_library' 30 NAME =
'test_compression' 31 if __name__ ==
'__main__':
32 rostest.unitrun(PKG, NAME, TestCompression)
def test_compress_decompress(self)