125 |
orig_table = DBFTable(os.path.join("..", "Data", "iceland", |
orig_table = DBFTable(os.path.join("..", "Data", "iceland", |
126 |
"political.dbf")) |
"political.dbf")) |
127 |
table = AutoTransientTable(self.transientdb, orig_table) |
table = AutoTransientTable(self.transientdb, orig_table) |
128 |
# Only a simple test here. The AutoTransientTable siply |
# Only a simple test here. The AutoTransientTable simply |
129 |
# delegates to its transient table so it should be OK that the |
# delegates to its transient table so it should be OK that the |
130 |
# real test for it is in test_transient_table_query. However, |
# real test for it is in test_transient_table_query. However, |
131 |
# it's important to check that the column handling works |
# it's important to check that the column handling works |
134 |
self.assertEquals(table.SimpleQuery(table.Column("AREA"), ">", 10.0), |
self.assertEquals(table.SimpleQuery(table.Column("AREA"), ">", 10.0), |
135 |
[144]) |
[144]) |
136 |
|
|
137 |
|
# test using a Column object as the right parameter |
138 |
|
self.assertEquals(table.SimpleQuery(table.Column("POPYTYPE"), |
139 |
|
"==", |
140 |
|
table.Column("POPYREG")), |
141 |
|
range(156)) |
142 |
|
|
143 |
def test_transient_joined_table(self): |
def test_transient_joined_table(self): |
144 |
"""Test TransientJoinedTable""" |
"""Test TransientJoinedTable""" |
145 |
simple = MemoryTable([("type", FIELDTYPE_STRING), |
simple = MemoryTable([("type", FIELDTYPE_STRING), |