Пример #1
0
 def test_col_rgb_bad_col_multi(self):
     with self.assertRaises(ValueError):
         map0 = col_utils.col_rgb(['white', 'bad'])
Пример #2
0
 def test_col_rgb_good_col_multi(self):
     self.assertEqual(
         col_utils.col_rgb(['white', 'black']).tolist(),
         [[255, 255, 255], [0, 0, 0]])
Пример #3
0
 def test_col_rgb_partial_match(self):
     with self.assertRaises(ValueError):
         col_utils.col_rgb('dark_')
Пример #4
0
 def test_col_rgb_good_col(self):
     self.assertEqual(col_utils.col_rgb('white').tolist(), [255, 255, 255])
Пример #5
0
 def test_col_rgb_wrong_col(self):
     with self.assertRaises(ValueError):
         col_utils.col_rgb('non_existing_col')