/[thuban]/trunk/thuban/test/test_classgen.py
ViewVC logotype

Diff of /trunk/thuban/test/test_classgen.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1436 by jonathan, Wed Jul 16 13:25:04 2003 UTC revision 1450 by bh, Fri Jul 18 10:18:56 2003 UTC
# Line 317  class TestCustomRamp(unittest.TestCase): Line 317  class TestCustomRamp(unittest.TestCase):
317          self.assertEquals(half.GetFill(), Color(1, 0.5, 0.5))          self.assertEquals(half.GetFill(), Color(1, 0.5, 0.5))
318          self.assertEquals(half.GetLineColor(), Color(0, 0.5, 0))          self.assertEquals(half.GetLineColor(), Color(0, 0.5, 0))
319    
320    
321  class TestFixedRamp(unittest.TestCase):  class TestFixedRamp(unittest.TestCase):
322    
323      def test(self):      def test(self):
324            """Test FixedRamp"""
325          eq = self.assertEquals          eq = self.assertEquals
326    
327          for lineColor, lineWidth, fillColor in \          for lineColor, lineWidth, fillColor in \
# Line 332  class TestFixedRamp(unittest.TestCase): Line 334  class TestFixedRamp(unittest.TestCase):
334    
335              for i in [0.0, 0.2, 0.4, 0.6, 0.8, 1.0]:              for i in [0.0, 0.2, 0.4, 0.6, 0.8, 1.0]:
336                  props = framp.GetProperties(i)                  props = framp.GetProperties(i)
337                  if lineColor: eq(props.GetLineColor(), lineColor)                  grey = Color(1 - i, 1 - i, 1 - i)
338                  if lineWidth: eq(props.GetLineWidth(), lineWidth)                  if lineColor is not None:
339                  if fillColor: eq(props.GetFill(), fillColor)                      eq(props.GetLineColor(), lineColor)
340                    else:
341                        eq(props.GetLineColor(), grey)
342                    if lineWidth is not None:
343                        eq(props.GetLineWidth(), lineWidth)
344                    if fillColor is not None:
345                        eq(props.GetFill(), fillColor)
346                    else:
347                        eq(props.GetFill(), grey)
348    
349  if __name__ == "__main__":  if __name__ == "__main__":
350      unittest.main()      unittest.main()

Legend:
Removed from v.1436  
changed lines
  Added in v.1450

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26