/[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 987 by bh, Thu May 22 16:46:14 2003 UTC revision 1016 by bh, Fri May 23 11:05:59 2003 UTC
# Line 29  from Thuban.Model.proj import Projection Line 29  from Thuban.Model.proj import Projection
29  from Thuban.Model.color import Color  from Thuban.Model.color import Color
30  from Thuban.Model.table import MemoryTable, FIELDTYPE_STRING, \  from Thuban.Model.table import MemoryTable, FIELDTYPE_STRING, \
31                                 FIELDTYPE_INT, FIELDTYPE_DOUBLE                                 FIELDTYPE_INT, FIELDTYPE_DOUBLE
32    from Thuban.Model.data import DerivedShapeStore
33    
34    
35  class TestSessionSimple(unittest.TestCase):  class TestSessionSimple(unittest.TestCase):
36    
# Line 103  class TestSessionSimple(unittest.TestCas Line 105  class TestSessionSimple(unittest.TestCas
105    
106          self.assertEquals(session.Tables(), [store.Table()])          self.assertEquals(session.Tables(), [store.Table()])
107    
108        def test_add_shapestore(self):
109            """Test Session.AddShapeStore()"""
110            session = self.session = Session("Test Session")
111            filename = os.path.join("..", "Data", "iceland",
112                                    "roads-line.shp")
113            try:
114                store = session.OpenShapefile(filename)
115                derived = DerivedShapeStore(store, store.Table())
116                session.AddShapeStore(derived)
117                self.assertEquals(session.ShapeStores(), [store, derived])
118            finally:
119                store = derived = None
120    
121    
122  class TestSessionBase(unittest.TestCase, support.SubscriberMixin):  class TestSessionBase(unittest.TestCase, support.SubscriberMixin):
123    

Legend:
Removed from v.987  
changed lines
  Added in v.1016

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26