/[thuban]/branches/WIP-pyshapelib-bramz/test/test_classgen.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/test/test_classgen.py

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

revision 1109 by jonathan, Mon May 12 11:21:14 2003 UTC revision 1110 by bh, Fri May 30 09:46:57 2003 UTC
# Line 1  Line 1 
1  # Copyright (c) 2002 by Intevation GmbH  # Copyright (c) 2002, 2003 by Intevation GmbH
2  # Authors:  # Authors:
3  # Bernhard Herzog <[email protected]>  # Bernhard Herzog <[email protected]>
4  #  #
# Line 16  import unittest Line 16  import unittest
16  import support  import support
17  support.initthuban()  support.initthuban()
18    
19  from Thuban.Model.classgen import ClassGenerator  from Thuban.Model.classgen import CalculateQuantiles
20  from Thuban.Model.range import Range  from Thuban.Model.range import Range
21    
22  class ClassGenTest(unittest.TestCase):  class ClassGenTest(unittest.TestCase):
# Line 26  class ClassGenTest(unittest.TestCase): Line 26  class ClassGenTest(unittest.TestCase):
26    
27          eq = self.assertEquals          eq = self.assertEquals
28    
         cg = ClassGenerator()  
   
29          #          #
30          # Test CalculateQuantiles          # Test CalculateQuantiles
31          #          #
32    
33          cq = cg.CalculateQuantiles          cq = CalculateQuantiles
34    
35          result = cq([1, 2, 3, 4], [.25, .5, .75, 1.0], Range("[1;4]"))          result = cq([1, 2, 3, 4], [.25, .5, .75, 1.0], Range("[1;4]"))
36          eq(result, (0, 0, 3, [(0, .25), (1, .5), (2, .75), (3, 1.0)]))          eq(result, (0, 0, 3, [(0, .25), (1, .5), (2, .75), (3, 1.0)]))

Legend:
Removed from v.1109  
changed lines
  Added in v.1110

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26