Esempio n. 1
0
 def test_run_length_decode(self):
     input_data = numpy.array([15, 3, 100, 2, 111, 4, 10000, 6])
     output_data_test = [
         15, 15, 15, 100, 100, 111, 111, 111, 111, 10000, 10000, 10000,
         10000, 10000, 10000
     ]
     output_data = decoders.run_length_decode(input_data).tolist()
     self.assertEqual(output_data, output_data_test)
Esempio n. 2
0
 def test_empty_run_length_decode(self):
     input_data = numpy.array([])
     output_data_test = []
     output_data = decoders.run_length_decode(input_data).tolist()
     self.assertEqual(output_data, output_data_test)
Esempio n. 3
0
 def test_run_length_decode(self):
     input_data = numpy.array([15,3,100,2,111,4,10000,6])
     output_data_test = [15,15,15,100,100,111,111,111,111,10000,10000,10000,10000,10000,10000]
     output_data = decoders.run_length_decode(input_data).tolist()
     self.assertEqual(output_data, output_data_test)