def test_encode_defaults(self): data = b'hello world' encoded = encode(data) # Check returned data, with the exception of the pixel data self.assertEqual(Encoded(width=100, height=100, bpp=24, pixels=None), encoded._replace(pixels=None)) self._assert_encoded_data(data, encoded)
def test_encode_module_size(self): data = b'hello world' encoded = encode(data, size='36x36', module_size=2) self.assertEqual(Encoded(width=92, height=92, bpp=24, pixels=None), encoded._replace(pixels=None))