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

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

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

trunk/thuban/test/test_map.py revision 1107 by jonathan, Fri May 30 06:31:02 2003 UTC branches/WIP-pyshapelib-bramz/test/test_map.py revision 2734 by bramz, Thu Mar 1 12:42:59 2007 UTC
# Line 79  class TestMapBase(unittest.TestCase, sup Line 79  class TestMapBase(unittest.TestCase, sup
79              self.map.Subscribe(channel, self.subscribe_with_params, channel)              self.map.Subscribe(channel, self.subscribe_with_params, channel)
80    
81      def tearDown(self):      def tearDown(self):
82          """Destroy self.map and clear the message list"""          """Destroy self.map and self.session and clear the message list"""
83            if hasattr(self, "session"):
84                self.session.Destroy()
85                self.session = None
86          self.map.Destroy()          self.map.Destroy()
87            self.map = None
88          self.clear_messages()          self.clear_messages()
89    
90    
# Line 91  class TestMapAddLayer(TestMapBase): Line 95  class TestMapAddLayer(TestMapBase):
95      def test_add_layer(self):      def test_add_layer(self):
96          """Test Map.AddLayer"""          """Test Map.AddLayer"""
97          # make sure the created Map is unmodified          # make sure the created Map is unmodified
98          session = Session("Test session for %s" % self.__class__)          session = self.session = Session("Test session for %s" %self.__class__)
99          self.failIf(self.map.WasModified())          self.failIf(self.map.WasModified())
100          self.failIf(self.map.HasLayers())          self.failIf(self.map.HasLayers())
101    
# Line 254  class TestMapWithContents(TestMapBase, s Line 258  class TestMapWithContents(TestMapBase, s
258          """Test Map.SetProjection"""          """Test Map.SetProjection"""
259          proj = Projection(["zone=26", "proj=utm", "ellps=clrk66"])          proj = Projection(["zone=26", "proj=utm", "ellps=clrk66"])
260          self.map.SetProjection(proj)          self.map.SetProjection(proj)
261          self.check_messages([(self.map, MAP_PROJECTION_CHANGED)])          self.check_messages([(self.map, None, MAP_PROJECTION_CHANGED)])
262          self.assert_(self.map.WasModified())          self.assert_(self.map.WasModified())
263    
264      def test_tree_info(self):      def test_tree_info(self):
# Line 275  class TestMapWithContents(TestMapBase, s Line 279  class TestMapWithContents(TestMapBase, s
279                              ('Projection',                              ('Projection',
280                               ['zone=26', 'proj=utm', 'ellps=clrk66']),                               ['zone=26', 'proj=utm', 'ellps=clrk66']),
281                              self.poly_layer,                              self.poly_layer,
282                              self.arc_layer]))                              self.arc_layer,
283                                self.map.LabelLayer()]))
284    
285      def test_forwarding_visibility(self):      def test_forwarding_visibility(self):
286          """Test Map's forwarding of Layer.SetVisible messages"""          """Test Map's forwarding of Layer.SetVisible messages"""

Legend:
Removed from v.1107  
changed lines
  Added in v.2734

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26