/[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 1166 by jonathan, Thu Jun 12 12:42:24 2003 UTC revision 1345 by jonathan, Tue Jul 1 16:11:38 2003 UTC
# Line 47  class ClassGenTest(unittest.TestCase): Line 47  class ClassGenTest(unittest.TestCase):
47    
48          eq = self.assertEquals          eq = self.assertEquals
49          gs = generate_singletons          gs = generate_singletons
50          ramp = GreyRamp()          ramp = GreyRamp
51    
52          _list = [1, 2, 3, 4]          _list = [1, 2, 3, 4]
53          cl = gs(_list, len(_list), ramp)          cl = gs(_list, ramp)
54          self.doClassSingleTest(cl, _list)          self.doClassSingleTest(cl, _list)
55    
56          _list = range(0, 100)          _list = range(0, 100)
57          cl = gs(_list, len(_list), ramp)          cl = gs(_list, ramp)
58          self.doClassSingleTest(cl, _list)          self.doClassSingleTest(cl, _list)
59    
60          _list = range(-100, 100)          _list = range(-100, 100)
61          cl = gs(_list, len(_list), ramp)          cl = gs(_list, ramp)
62          self.doClassSingleTest(cl, _list)          self.doClassSingleTest(cl, _list)
63    
64          _list = ['a', 'b', 'c', 'd']          _list = ['a', 'b', 'c', 'd']
65          cl = gs(_list, len(_list), ramp)          cl = gs(_list, ramp)
66          self.doClassSingleTest(cl, _list)          self.doClassSingleTest(cl, _list)
67    
68          _list = []          _list = []
69          cl = gs(_list, len(_list), ramp)          cl = gs(_list, ramp)
70          self.doClassSingleTest(cl, _list)          self.doClassSingleTest(cl, _list)
71    
72          _list = [1]          _list = [1]
73          cl = gs(_list, len(_list), ramp)          cl = gs(_list, ramp)
74          self.doClassSingleTest(cl, _list)          self.doClassSingleTest(cl, _list)
75                    
76    
# Line 79  class ClassGenTest(unittest.TestCase): Line 79  class ClassGenTest(unittest.TestCase):
79    
80          eq = self.assertEquals          eq = self.assertEquals
81          gud = generate_uniform_distribution          gud = generate_uniform_distribution
82          ramp = GreyRamp()          ramp = GreyRamp
83    
84          cl = gud(0, 99, 10, ramp, True)          cl = gud(0, 99, 10, ramp, True)
85          self.doClassRangeTest(cl, ("[0;10[", "[10;20[", "[20;30[", "[30;40[",          self.doClassRangeTest(cl, ("[0;10[", "[10;20[", "[20;30[", "[30;40[",
# Line 110  class ClassGenTest(unittest.TestCase): Line 110  class ClassGenTest(unittest.TestCase):
110    
111          gq = generate_quantiles          gq = generate_quantiles
112    
113          ramp = GreyRamp()          ramp = GreyRamp
114    
115          adj, cl = gq([1, 2, 3, 4], [.25, .5, .75, 1.0], ramp, Range("[1;4]"))          adj, cl = gq([1, 2, 3, 4], [.25, .5, .75, 1.0], ramp, Range("[1;4]"))
116          self.failIf(adj)          self.failIf(adj)

Legend:
Removed from v.1166  
changed lines
  Added in v.1345

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26