Package sparked :: Package test :: Module test_graphics
[hide private]
[frames] | no frames]

Source Code for Module sparked.test.test_graphics

 1  # Copyright (c) 2010 Arjan Scherpenisse 
 2  # See LICENSE for details. 
 3   
 4  """ 
 5  Tests for sparked.graphics.* 
 6   
 7  Maintainer: Arjan Scherpenisse 
 8  """ 
 9   
10  from twisted.trial import unittest 
11   
12  from sparked.graphics import util 
13   
14 -class TestGraphicsUtil(unittest.TestCase):
15 """ 16 Test the L{sparked.monitors.MonitorContainer} 17 """ 18
19 - def testParseColor(self):
20 map = [ 21 ( (0,0,0), "000000"), 22 ( (0,0,0), "000"), 23 ( (0,0,0), "#000000"), 24 ( (0,0,0), "#000"), 25 ( (1,1,1), "FFFFFF"), 26 ( (1,1,1), "FFF"), 27 ( (1,1,1), "#FFFFFF"), 28 ( (1,1,1), "#FFF") 29 ] 30 31 [self.assertEqual(a, util.parseColor(b)) for a,b in map]
32