コード例 #1
0
 def test_input_w_whitespace(self):
     text = "             #ff0000             "
     self.assertEqual(utils.hex_to_tuple(text), (255, 0, 0))
コード例 #2
0
 def test_input_wo_hash(self):
     text = "ff0000"
     self.assertEqual(utils.hex_to_tuple(text), (255, 0, 0))
コード例 #3
0
 def test_correct_input_3(self):
     text = "#f00"
     self.assertEqual(utils.hex_to_tuple(text), (255, 0, 0))