コード例 #1
0
	def test_to_hex(self):
		self.assertEqual(Bus._to_hex(16, 1), "10")
		self.assertEqual(Bus._to_hex(16, 2), "0010")
		self.assertRaises(AssertionError, Bus._to_hex, 500, 1)
		self.assertRaises(AssertionError, Bus._to_hex, "a", 1)