MCPcopy
hub / github.com/django/django / test07_integer_overflow

Method test07_integer_overflow

tests/gis_tests/gdal_tests/test_ds.py:340–348  ·  view source on GitHub ↗

Testing that OFTReal fields, treated as OFTInteger, do not overflow.

(self)

Source from the content-addressed store, hash-verified

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]

Callers

nothing calls this directly

Calls 3

DataSourceClass · 0.90
joinMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected