def test_encode_line_lena(self): self.maxDiff = None line_numbers = [1, 10, 100] for line in line_numbers: file = open(get_asset_filename("MartinM1_encode_line_lena%d.p" % line)) expected = pickle.load(file) actual = list(self.lena.encode_line(line)) self.assertEqual(expected, actual)
def test_encode_line_lena(self): self.maxDiff = None line_numbers = [1, 10, 100] for line in line_numbers: file = open( get_asset_filename("MartinM1_encode_line_lena%d.p" % line)) expected = pickle.load(file) actual = list(self.lena.encode_line(line)) self.assertEqual(expected, actual)
def setUp(self): self.image = Image.new('RGB', (320, 256)) self.s = color.MartinM1(self.image, 48000, 16) lena = Image.open(get_asset_filename('320x256.png')) self.lena = color.MartinM1(lena, 48000, 16)
def test_gen_freq_bits_lena(self): expected = pickle.load(open(get_asset_filename("MartinM1_freq_bits_lena.p"))) actual = list(islice(self.lena.gen_freq_bits(), 0, 1000)) self.assertEqual(expected, actual)
def test_gen_freq_bits_lena(self): expected = pickle.load( open(get_asset_filename("MartinM1_freq_bits_lena.p"))) actual = list(islice(self.lena.gen_freq_bits(), 0, 1000)) self.assertEqual(expected, actual)