Testing that OFTReal fields, treated as OFTInteger, do not overflow.
(self)
| 338 | self.assertEqual(3, len(lyr)) |
| 339 | |
| 340 | def test07_integer_overflow(self): |
| 341 | "Testing that OFTReal fields, treated as OFTInteger, do not overflow." |
| 342 | # Using *.dbf from Census 2010 TIGER Shapefile for Texas, |
| 343 | # which has land area ('ALAND10') stored in a Real field |
| 344 | # with no precision. |
| 345 | ds = DataSource(os.path.join(TEST_DATA, "texas.dbf")) |
| 346 | feat = ds[0][0] |
| 347 | # Reference value obtained using `ogrinfo`. |
| 348 | self.assertEqual(676586997978, feat.get("ALAND10")) |
| 349 | |
| 350 | def test_nonexistent_field(self): |
| 351 | source = ds_list[0] |
nothing calls this directly
no test coverage detected