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

Diff of /branches/WIP-pyshapelib-bramz/test/test_transientdb.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 998 by bh, Thu May 22 19:29:39 2003 UTC
# Line 101  class TestTransientTable(unittest.TestCa Line 101  class TestTransientTable(unittest.TestCa
101          # The transient_table method should return the table itself          # The transient_table method should return the table itself
102          self.assert_(table is table.transient_table())          self.assert_(table is table.transient_table())
103    
104            # The title is simply copied over from the original table
105            self.assertEquals(table.Title(), orig_table.Title())
106    
107          # The TransientTable class itself doesn't implement the          # The TransientTable class itself doesn't implement the
108          # Dependencies method, so we don't test it.          # Dependencies method, so we don't test it.
109    
# Line 150  class TestTransientTable(unittest.TestCa Line 153  class TestTransientTable(unittest.TestCa
153          table = AutoTransientTable(self.transientdb, orig_table)          table = AutoTransientTable(self.transientdb, orig_table)
154          self.assertEquals(table.Dependencies(), (orig_table,))          self.assertEquals(table.Dependencies(), (orig_table,))
155    
156        def test_auto_transient_table_title(self):
157            """Test AutoTransientTable.Title()"""
158            orig_table = DBFTable(os.path.join("..", "Data", "iceland",
159                                               "political.dbf"))
160            table = AutoTransientTable(self.transientdb, orig_table)
161            # The title is of course the same as that of the original table
162            self.assertEquals(table.Title(), orig_table.Title())
163    
164      def test_transient_joined_table(self):      def test_transient_joined_table(self):
165          """Test TransientJoinedTable"""          """Test TransientJoinedTable"""
166          simple = MemoryTable([("type", FIELDTYPE_STRING),          simple = MemoryTable([("type", FIELDTYPE_STRING),
# Line 198  class TestTransientTable(unittest.TestCa Line 209  class TestTransientTable(unittest.TestCa
209          # The TransientJoinedTable depends on both input tables          # The TransientJoinedTable depends on both input tables
210          self.assertEquals(table.Dependencies(), (landmarks, auto))          self.assertEquals(table.Dependencies(), (landmarks, auto))
211    
212            # The title is constructed from the titles of the input tables.
213            self.assertEquals(table.Title(),
214                              "Join of %s and %s" % (landmarks.Title(),
215                                                     auto.Title()))
216    
217    
218      def test_transient_table_read_twice(self):      def test_transient_table_read_twice(self):
219          """Test TransientTable.ReadRowAsDict() reading the same record twice"""          """Test TransientTable.ReadRowAsDict() reading the same record twice"""

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26