74 |
'POPYTYPE': 1, 'PERIMETER': 88.518000000000001, |
'POPYTYPE': 1, 'PERIMETER': 88.518000000000001, |
75 |
'POPYREG': '1', |
'POPYREG': '1', |
76 |
'PONET_ID': 145}) |
'PONET_ID': 145}) |
77 |
|
self.assertEquals(table.ReadRowAsDict(144, row_is_ordinal = 1), |
78 |
|
{'POPYCOUN': 'IC', 'POPYADMIN': '', 'PONET_': 146, |
79 |
|
'AREA': 19.462, |
80 |
|
'POPYTYPE': 1, 'PERIMETER': 88.518000000000001, |
81 |
|
'POPYREG': '1', |
82 |
|
'PONET_ID': 145}) |
83 |
self.assertEquals(table.ReadValue(144, "AREA"), 19.462) |
self.assertEquals(table.ReadValue(144, "AREA"), 19.462) |
84 |
self.assertEquals(table.ReadValue(144, 3), 145) |
self.assertEquals(table.ReadValue(144, 3), 145) |
85 |
|
self.assertEquals(table.ReadValue(144, "AREA", row_is_ordinal = 1), |
86 |
|
19.462) |
87 |
|
self.assertEquals(table.ReadValue(144, 3, row_is_ordinal = 1), 145) |
88 |
|
|
89 |
|
self.assertEquals(table.RowIdToOrdinal(23), 23) |
90 |
|
self.assertEquals(table.RowOrdinalToId(23), 23) |
91 |
|
|
92 |
# ValueRange may induce a copy to the transient database. |
# ValueRange may induce a copy to the transient database. |
93 |
# Therefore we put it last so that we can execute this method |
# Therefore we put it last so that we can execute this method |
214 |
'code': 1, 'type': 'RUINS'}) |
'code': 1, 'type': 'RUINS'}) |
215 |
self.assertEquals(table.ReadValue(22, "type"), 'RUINS') |
self.assertEquals(table.ReadValue(22, "type"), 'RUINS') |
216 |
self.assertEquals(table.ReadValue(22, 7), 1) |
self.assertEquals(table.ReadValue(22, 7), 1) |
217 |
|
self.assertEquals(table.ReadValue(22, "type", row_is_ordinal = 1), |
218 |
|
"RUINS") |
219 |
|
self.assertEquals(table.ReadValue(22, 7, row_is_ordinal = 1), 1) |
220 |
|
self.assertEquals(table.RowIdToOrdinal(23), 23) |
221 |
|
self.assertEquals(table.RowOrdinalToId(23), 23) |
222 |
|
|
223 |
# The transient_table method should return the table itself |
# The transient_table method should return the table itself |
224 |
self.assert_(table is table.transient_table()) |
self.assert_(table is table.transient_table()) |