Пример #1
0
 def test__parseColours_tupleList(self):
     l = [(100, 80, 60), (209, 123, 193), (0, 0, 0), (255, 255, 255)]
     self.assertEqual(l, PatternedImage._parseColoursList(l))
Пример #2
0
 def test__parseColours_tuple_malformed(self):
     cs = PatternedImage._parseColoursList((100, 80))
     self.assertEqual(1, len(cs))
     self.assertEqual(3, len(cs[0]))
     self.assertEqual((100, 80), cs[0][:2])
Пример #3
0
 def test__parseColours_255(self):
     self.assertEqual([(255, 255, 255)],
                      PatternedImage._parseColoursList(255))
Пример #4
0
 def test__parseColours_tuple(self):
     self.assertEqual([(100, 80, 60)],
                      PatternedImage._parseColoursList((100, 80, 60)))
Пример #5
0
 def test__parseColours_0(self):
     self.assertEqual([(0, 0, 0)], PatternedImage._parseColoursList(0))