/[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 984 by bh, Thu May 22 16:37:48 2003 UTC revision 987 by bh, Thu May 22 16:46:14 2003 UTC
# Line 69  class TestSessionSimple(unittest.TestCas Line 69  class TestSessionSimple(unittest.TestCas
69          table = session.AddTable(memtable)          table = session.AddTable(memtable)
70          self.assertEquals(session.Tables(), [table])          self.assertEquals(session.Tables(), [table])
71    
72        def test_remove_table(self):
73            """Test Session.RemoveTable()"""
74            session = self.session = Session("Test Session")
75            memtable = MemoryTable([("type", FIELDTYPE_STRING),
76                                    ("value", FIELDTYPE_DOUBLE),
77                                    ("code", FIELDTYPE_INT)],
78                                   [("OTHER/UNKNOWN", -1.5, 11),
79                                    ("RUINS", 0.0, 1),
80                                    ("FARM", 3.141, 2),
81                                    ("BUILDING", 2.5, 3),
82                                    ("HUT", 1e6, 4),
83                                    ("LIGHTHOUSE", -0.01, 5)])
84            table = session.AddTable(memtable)
85            self.assertEquals(session.Tables(), [table])
86            session.RemoveTable(table)
87            self.assertEquals(session.Tables(), [])
88            self.assertRaises(ValueError, session.RemoveTable, table)
89    
90      def test_open_shapefile(self):      def test_open_shapefile(self):
91          """Test Session.OpenShapefile()"""          """Test Session.OpenShapefile()"""
92          session = self.session = Session("Test Session")          session = self.session = Session("Test Session")

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26