def test_number_zero(self): self.assertEqual(decimalBaseConvert(0, 8), "0")
def test_base_lower_than_2(self): with self.assertRaises(ValueError): decimalBaseConvert(165, -2)
def test_base_higher_than_16(self): with self.assertRaises(ValueError): decimalBaseConvert(45, 17)
def test_decimal_to_hexadecimal(self): self.assertEqual(decimalBaseConvert(15, 16), "F")
def test_decimal_to_octal(self): self.assertEqual(decimalBaseConvert(21, 8), "25")
def test_decimal_to_binary(self): self.assertEqual(decimalBaseConvert(12, 2), "1100")