Test indexing and slicing on Layers.
(self)
| 212 | feat.__getitem__("invalid") |
| 213 | |
| 214 | def test03b_layer_slice(self): |
| 215 | "Test indexing and slicing on Layers." |
| 216 | # Using the first data-source because the same slice |
| 217 | # can be used for both the layer and the control values. |
| 218 | source = ds_list[0] |
| 219 | ds = DataSource(source.ds) |
| 220 | |
| 221 | sl = slice(1, 3) |
| 222 | feats = ds[0][sl] |
| 223 | |
| 224 | for fld_name in ds[0].fields: |
| 225 | test_vals = [feat.get(fld_name) for feat in feats] |
| 226 | control_vals = source.field_values[fld_name][sl] |
| 227 | self.assertEqual(control_vals, test_vals) |
| 228 | |
| 229 | def test03c_layer_references(self): |
| 230 | """ |
nothing calls this directly
no test coverage detected