예제 #1
0
파일: test_color.py 프로젝트: Civile/pySSTV
 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)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
파일: test_color.py 프로젝트: Civile/pySSTV
 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)
예제 #5
0
파일: test_color.py 프로젝트: Civile/pySSTV
 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)
예제 #6
0
 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)