[Django] #26147: GIS test tolerances need some tuning for PostGIS 2.2

21 views
Skip to first unread message

Django

unread,
Jan 27, 2016, 12:55:13 PM1/27/16
to django-...@googlegroups.com
#26147: GIS test tolerances need some tuning for PostGIS 2.2
------------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
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?

--
Ticket URL: <https://code.djangoproject.com/ticket/26147>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 28, 2016, 2:40:23 AM1/28/16
to django-...@googlegroups.com
#26147: GIS test tolerances need some tuning for PostGIS 2.2
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* easy: 0 => 1
* stage: Unreviewed => Accepted


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/26147#comment:1>

Django

unread,
Jan 28, 2016, 7:45:44 AM1/28/16
to django-...@googlegroups.com
#26147: GIS test tolerances need some tuning for PostGIS 2.2
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: timgraham
Type: | Status: assigned
Cleanup/optimization |
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => assigned
* owner: nobody => timgraham


--
Ticket URL: <https://code.djangoproject.com/ticket/26147#comment:2>

Django

unread,
Jan 28, 2016, 10:55:07 AM1/28/16
to django-...@googlegroups.com
#26147: GIS test tolerances need some tuning for PostGIS 2.2
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: timgraham
Type: | Status: assigned
Cleanup/optimization |
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1
* easy: 1 => 0


Comment:

[https://github.com/django/django/pull/6058 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/26147#comment:3>

Django

unread,
Jan 28, 2016, 2:01:43 PM1/28/16
to django-...@googlegroups.com
#26147: GIS test tolerances need some tuning for PostGIS 2.2
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: timgraham
Type: | Status: assigned
Cleanup/optimization |
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/26147#comment:4>

Django

unread,
Jan 28, 2016, 2:12:32 PM1/28/16
to django-...@googlegroups.com
#26147: GIS test tolerances need some tuning for PostGIS 2.2
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: timgraham
Type: | Status: closed
Cleanup/optimization |
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"5aa53286758fbb1fb864a5efda38718a2ca96759" 5aa53286]:
{{{
#!CommitTicketReference repository=""
revision="5aa53286758fbb1fb864a5efda38718a2ca96759"
Fixed #26147 -- Relaxed expected values in GIS tests to account for
database/library differences.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26147#comment:5>

Django

unread,
Jan 28, 2016, 2:38:45 PM1/28/16
to django-...@googlegroups.com
#26147: GIS test tolerances need some tuning for PostGIS 2.2
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: timgraham
Type: | Status: closed
Cleanup/optimization |
Component: GIS | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"61452616baca63fa58efbb5991f65ba362eccbe2" 6145261]:
{{{
#!CommitTicketReference repository=""
revision="61452616baca63fa58efbb5991f65ba362eccbe2"
[1.9.x] Fixed #26147 -- Relaxed expected values in GIS tests to account
for database/library differences.

Backport of 5aa53286758fbb1fb864a5efda38718a2ca96759 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26147#comment:6>

Django

unread,
Jan 28, 2016, 5:46:51 PM1/28/16
to django-...@googlegroups.com
#26147: GIS test tolerances need some tuning for PostGIS 2.2
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: timgraham
Type: | Status: closed
Cleanup/optimization |
Component: GIS | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"99cd139a30329ff3b8f0d1346c8fd4770cbd7141" 99cd139a]:
{{{
#!CommitTicketReference repository=""
revision="99cd139a30329ff3b8f0d1346c8fd4770cbd7141"
[1.8.x] Fixed #26147 -- Relaxed expected values in GIS tests to account
for database/library differences.

Backport of 5aa53286758fbb1fb864a5efda38718a2ca96759 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26147#comment:7>

Reply all
Reply to author
Forward
0 new messages