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

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

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

revision 2644 by bh, Tue Jul 5 16:30:51 2005 UTC revision 2688 by frank, Fri Jun 30 12:27:20 2006 UTC
# Line 32  from Thuban.Model.table import FIELDTYPE Line 32  from Thuban.Model.table import FIELDTYPE
32  from Thuban.Model.proj import Projection  from Thuban.Model.proj import Projection
33  from Thuban.Model.data import DerivedShapeStore  from Thuban.Model.data import DerivedShapeStore
34  from Thuban.Model.classification import Classification, ClassGroupSingleton, \  from Thuban.Model.classification import Classification, ClassGroupSingleton, \
35       ClassGroupRange       ClassGroupRange, ClassGroupPattern
36  from Thuban.Model.color import Color  from Thuban.Model.color import Color
37    
38  import Thuban.Model.resource  import Thuban.Model.resource
# Line 416  class TestLayerModification(unittest.Tes Line 416  class TestLayerModification(unittest.Tes
416          # the layer.          # the layer.
417          self.failIf(self.layer.WasModified())          self.failIf(self.layer.WasModified())
418    
419      def test_set_classification(self):      def test_set_classification_numerical(self):
420          """Test Layer.SetClassification"""          """Test Layer.SetClassification numerical"""
421          classification = Classification()          classification = Classification()
422          classification.AppendGroup(ClassGroupRange((0.0, 0.1)))          classification.AppendGroup(ClassGroupRange((0.0, 0.1)))
423    
# Line 437  class TestLayerModification(unittest.Tes Line 437  class TestLayerModification(unittest.Tes
437    
438          self.check_messages([(self.layer, LAYER_CHANGED)])          self.check_messages([(self.layer, LAYER_CHANGED)])
439          self.failUnless(self.layer.WasModified())          self.failUnless(self.layer.WasModified())
440    
441        def test_set_classification_textual(self):
442            """Test Layer.SetClassification textual"""
443            classification = Classification()
444            classification.AppendGroup(ClassGroupPattern("I"))
445    
446            self.layer.SetClassification(classification)
447            self.layer.SetClassificationColumn("POPYCOUN")
448    
449            self.check_messages([(self.layer, LAYER_CHANGED),
450                                 (self.layer, LAYER_CHANGED)])
451            self.failUnless(self.layer.WasModified())
452    
453            self.clear_messages()
454            self.layer.UnsetModified()
455    
456            # change only the classification column. This should issue a
457            # LAYER_CHANGED message as well.
458            self.layer.SetClassificationColumn("POPYREG")
459    
460            self.check_messages([(self.layer, LAYER_CHANGED)])
461            self.failUnless(self.layer.WasModified())
462    
463    
464      def test_tree_info(self):      def test_tree_info(self):

Legend:
Removed from v.2644  
changed lines
  Added in v.2688

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26