/[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 948 by jonathan, Tue May 20 15:27:31 2003 UTC revision 984 by bh, Thu May 22 16:37:48 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 TransientTable class itself doesn't implement the
105            # Dependencies method, so we don't test it.
106    
107    
108      def test_auto_transient_table(self):      def test_auto_transient_table(self):
109          """Test AutoTransientTable(dbftable)          """Test AutoTransientTable(dbftable)
# Line 135  class TestTransientTable(unittest.TestCa Line 138  class TestTransientTable(unittest.TestCa
138                            [144])                            [144])
139    
140          # test using a Column object as the right parameter          # test using a Column object as the right parameter
141          self.assertEquals(table.SimpleQuery(table.Column("POPYTYPE"),          self.assertEquals(table.SimpleQuery(table.Column("POPYTYPE"),
142                                              "==",                                              "==",
143                                              table.Column("POPYREG")),                                              table.Column("POPYREG")),
144                            range(156))                            range(156))
145    
146        def test_auto_transient_table_dependencies(self):
147            """Test AutoTransientTable.Dependencies()"""
148            orig_table = DBFTable(os.path.join("..", "Data", "iceland",
149                                               "political.dbf"))
150            table = AutoTransientTable(self.transientdb, orig_table)
151            self.assertEquals(table.Dependencies(), (orig_table,))
152    
153      def test_transient_joined_table(self):      def test_transient_joined_table(self):
154          """Test TransientJoinedTable"""          """Test TransientJoinedTable"""
155          simple = MemoryTable([("type", FIELDTYPE_STRING),          simple = MemoryTable([("type", FIELDTYPE_STRING),
# Line 185  class TestTransientTable(unittest.TestCa Line 195  class TestTransientTable(unittest.TestCa
195          # The transient_table method should return the table itself          # The transient_table method should return the table itself
196          self.assert_(table is table.transient_table())          self.assert_(table is table.transient_table())
197    
198            # The TransientJoinedTable depends on both input tables
199            self.assertEquals(table.Dependencies(), (landmarks, auto))
200    
201    
202      def test_transient_table_read_twice(self):      def test_transient_table_read_twice(self):
203          """Test TransientTable.ReadRowAsDict() reading the same record twice"""          """Test TransientTable.ReadRowAsDict() reading the same record twice"""

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26