def testNumberToLowerEndian(self): self.assertEqual(algorithmic.number_to_lower_endian(0, 2), [0]) self.assertEqual(algorithmic.number_to_lower_endian(0, 7), [0]) self.assertEqual(algorithmic.number_to_lower_endian(1, 2), [1]) self.assertEqual(algorithmic.number_to_lower_endian(5, 8), [5]) self.assertEqual(algorithmic.number_to_lower_endian(2, 2), [0, 1]) self.assertEqual(algorithmic.number_to_lower_endian(6, 2), [0, 1, 1]) self.assertEqual(algorithmic.number_to_lower_endian(2137, 10), [7, 3, 1, 2])
def testNumberToLowerEndian(self): self.assertEqual(algorithmic.number_to_lower_endian(0, 2), [0]) self.assertEqual(algorithmic.number_to_lower_endian(0, 7), [0]) self.assertEqual(algorithmic.number_to_lower_endian(1, 2), [1]) self.assertEqual(algorithmic.number_to_lower_endian(5, 8), [5]) self.assertEqual(algorithmic.number_to_lower_endian(2, 2), [0, 1]) self.assertEqual(algorithmic.number_to_lower_endian(6, 2), [0, 1, 1]) self.assertEqual(algorithmic.number_to_lower_endian(2137, 10), [7, 3, 1, 2])