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

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

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

revision 584 by jonathan, Tue Apr 1 10:22:35 2003 UTC revision 723 by bh, Thu Apr 24 15:31:53 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 71  class TestSessionBase(unittest.TestCase, Line 71  class TestSessionBase(unittest.TestCase,
71      def tearDown(self):      def tearDown(self):
72          """Destroy self.session and clear the message list"""          """Destroy self.session and clear the message list"""
73          self.session.Destroy()          self.session.Destroy()
74            self.session = None
75          self.clear_messages()          self.clear_messages()
76    
77    
# Line 105  class TestSessionWithContent(TestSession Line 106  class TestSessionWithContent(TestSession
106          """Extend the inherited method to add a non-empty map to self.session          """Extend the inherited method to add a non-empty map to self.session
107          """          """
108          TestSessionBase.setUp(self)          TestSessionBase.setUp(self)
109            open_shp = self.session.OpenShapefile
110          self.arc_layer = Layer("Roads",          self.arc_layer = Layer("Roads",
111                                 os.path.join("..", "Data", "iceland",                                 open_shp(os.path.join("..", "Data", "iceland",
112                                              "roads-line.shp"))                                                       "roads-line.shp")))
113          self.poly_layer = Layer("Political",          self.poly_layer = Layer("Political",
114                                  os.path.join("..", "Data", "iceland",                                  open_shp(os.path.join("..", "Data", "iceland",
115                                               "political.shp"))                                                        "political.shp")))
116          self.map = Map("A Map")          self.map = Map("A Map")
117          self.map.AddLayer(self.arc_layer)          self.map.AddLayer(self.arc_layer)
118          self.map.AddLayer(self.poly_layer)          self.map.AddLayer(self.poly_layer)
# Line 118  class TestSessionWithContent(TestSession Line 120  class TestSessionWithContent(TestSession
120          self.session.UnsetModified()          self.session.UnsetModified()
121          self.clear_messages()          self.clear_messages()
122    
123        def tearDown(self):
124            TestSessionBase.tearDown(self)
125            self.arc_layer = self.poly_layer = None
126    
127      def test_remove_map(self):      def test_remove_map(self):
128          """Test Session.RemoveMap"""          """Test Session.RemoveMap"""
129          self.session.RemoveMap(self.map)          self.session.RemoveMap(self.map)

Legend:
Removed from v.584  
changed lines
  Added in v.723

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26