示例#1
0
	def test_int_to_base_negative(self):
		self.assertEqual(lab1.int_to_base(-16, 2), "-10000")
示例#2
0
	def test_int_to_base_10(self):
		self.assertEqual(lab1.int_to_base(16, 10), "16")
示例#3
0
	def test_int_to_base_0(self):
		self.assertEqual(lab1.int_to_base(16, 0), "0")
示例#4
0
	def test_int_to_base_2(self):
		self.assertEqual(lab1.int_to_base(123, 2), lab1.binarify(123))
示例#5
0
	def test_int_to_base_3(self):
		self.assertEqual(lab1.int_to_base(12, 3), "110")
 def test_int_to_base_negative(self):
     self.assertEqual(lab1.int_to_base(-16, 2), "-10000")
 def test_int_to_base_0(self):
     self.assertEqual(lab1.int_to_base(16, 0), "0")
 def test_int_to_base_10(self):
     self.assertEqual(lab1.int_to_base(16, 10), "16")
 def test_int_to_base_3(self):
     self.assertEqual(lab1.int_to_base(12, 3), "110")
示例#10
0
 def test_int_to_base_2(self):
     self.assertEqual(lab1.int_to_base(123, 2), lab1.binarify(123))