Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26147 closed Cleanup/optimization (fixed)

GIS test tolerances need some tuning for PostGIS 2.2

Reported by: Tim Graham Owned by: Tim Graham
Component: GIS Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Running the tests on Ubuntu 16.04 alpha with PostGIS 2.2 gives some failures:

======================================================================
FAIL [0.007s]: test_distance_geodetic_spheroid (gis_tests.distapp.tests.DistanceFunctionsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/django-security-master/workspace/database/postgis/python/python3.5/django/test/testcases.py", line 1068, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/var/lib/jenkins/jobs/django-security-master/workspace/database/postgis/python/python3.5/tests/gis_tests/distapp/tests.py", line 598, in test_distance_geodetic_spheroid
    self.assertAlmostEqual(spheroid_distances[i], c.distance.m, tol)
AssertionError: 709599.234564757 != 709599.234573457 within 5 places

======================================================================
FAIL [0.011s]: test_distance_geodetic (gis_tests.distapp.tests.DistanceTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/django-security-master/workspace/database/postgis/python/python3.5/django/test/testcases.py", line 1068, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/var/lib/jenkins/jobs/django-security-master/workspace/database/postgis/python/python3.5/django/test/utils.py", line 208, in inner
    return func(*args, **kwargs)
  File "/var/lib/jenkins/jobs/django-security-master/workspace/database/postgis/python/python3.5/tests/gis_tests/distapp/tests.py", line 200, in test_distance_geodetic
    self.assertAlmostEqual(spheroid_distances[i], c.distance.m, tol)
AssertionError: 709599.234564757 != 709599.234573457 within 5 places

======================================================================
FAIL [0.002s]: test_geography_area (gis_tests.geogapp.tests.GeographyFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/django-security-master/workspace/database/postgis/python/python3.5/django/test/testcases.py", line 1068, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/var/lib/jenkins/jobs/django-security-master/workspace/database/postgis/python/python3.5/tests/gis_tests/geogapp/tests.py", line 134, in test_geography_area
    self.assertAlmostEqual(z.area.sq_m, ref_area, tol)
AssertionError: 5439101.21424022 != 5439084.70637573 within 5 places

======================================================================
FAIL [0.006s]: test06_geography_area (gis_tests.geogapp.tests.GeographyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/django-security-master/workspace/database/postgis/python/python3.5/django/test/testcases.py", line 1068, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/var/lib/jenkins/jobs/django-security-master/workspace/database/postgis/python/python3.5/django/test/utils.py", line 208, in inner
    return func(*args, **kwargs)
  File "/var/lib/jenkins/jobs/django-security-master/workspace/database/postgis/python/python3.5/tests/gis_tests/geogapp/tests.py", line 104, in test06_geography_area
    self.assertAlmostEqual(z.area.sq_m, ref_area, tol)
AssertionError: 5439101.21424022 != 5439084.70637573 within 5 places

Should we adjust the tolerances accordingly?

Change History (7)

comment:1 by Claude Paroz, 8 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted

Sure, our tests are not there to test underlying tools precision.

comment:2 by Tim Graham, 8 years ago

Owner: changed from nobody to Tim Graham
Status: newassigned

comment:3 by Tim Graham, 8 years ago

Easy pickings: unset
Has patch: set

comment:4 by Claude Paroz, 8 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 5aa53286:

Fixed #26147 -- Relaxed expected values in GIS tests to account for database/library differences.

comment:6 by Tim Graham <timograham@…>, 8 years ago

In 6145261:

[1.9.x] Fixed #26147 -- Relaxed expected values in GIS tests to account for database/library differences.

Backport of 5aa53286758fbb1fb864a5efda38718a2ca96759 from master

comment:7 by Tim Graham <timograham@…>, 8 years ago

In 99cd139a:

[1.8.x] Fixed #26147 -- Relaxed expected values in GIS tests to account for database/library differences.

Backport of 5aa53286758fbb1fb864a5efda38718a2ca96759 from master

Note: See TracTickets for help on using tickets.
Back to Top