Beispiel #1
0
 def test_get_str_from_rgb255_notmatch(self):
     # assert not incorrect conversions
     randidx = numpy.random.randint(0,high=len(self.valid_colors),size=len(self.valid_colors))
     for i,(_,my_tup) in zip(randidx,self.valid_colors):
         if self.valid_colors[i][1] != my_tup:
             self.assertNotEqual(get_str_from_rgb255(my_tup),
                                 self.valid_colors[i][1])
Beispiel #2
0
 def test_get_str_from_rgb255_notmatch(self):
     # assert not incorrect conversions
     randidx = numpy.random.randint(0,
                                    high=len(self.valid_colors),
                                    size=len(self.valid_colors))
     for i, (_, my_tup) in zip(randidx, self.valid_colors):
         if self.valid_colors[i][1] != my_tup:
             self.assertNotEqual(get_str_from_rgb255(my_tup),
                                 self.valid_colors[i][1])
Beispiel #3
0
 def test_get_str_from_rgb255_match(self):
     # test correct conversions
     for my_str, my_tup in self.valid_colors:
         self.assertEqual(my_str.upper(),
                          get_str_from_rgb255(my_tup).upper())
Beispiel #4
0
 def test_get_str_from_rgb255_match(self):
     # test correct conversions
     for my_str, my_tup in self.valid_colors:
         self.assertEqual(my_str.upper(),get_str_from_rgb255(my_tup).upper())