def test__parseColours_tupleList(self):
     l = [(100, 80, 60), (209, 123, 193), (0, 0, 0), (255, 255, 255)]
     self.assertEqual(l, PatternedImage._parseColoursList(l))
 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])
 def test__parseColours_255(self):
     self.assertEqual([(255, 255, 255)],
                      PatternedImage._parseColoursList(255))
 def test__parseColours_tuple(self):
     self.assertEqual([(100, 80, 60)],
                      PatternedImage._parseColoursList((100, 80, 60)))
 def test__parseColours_0(self):
     self.assertEqual([(0, 0, 0)], PatternedImage._parseColoursList(0))