Opened 3 years ago

Last modified 5 weeks ago

#23842 new Bug

Transient failure of django.contrib.gis.tests.geoapp.tests.GeoQuerySetTest.test_make_line

Reported by: Simon Charette Owned by: nobody
Component: GIS Version: master
Severity: Normal Keywords:
Cc: t.chaumeny@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Traceback (most recent call last):
  File "/home/jenkins/workspace/django-master/database/postgis/python/python3.2/django/test/", line 959, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/home/jenkins/workspace/django-master/database/postgis/python/python3.2/django/contrib/gis/tests/geoapp/", line 632, in test_make_line
    self.assertTrue(ref_line.equals_exact(City.objects.make_line(), tolerance=10e-5))
AssertionError: False is not true

Change History (8)

comment:1 Changed 3 years ago by Thomas Chaumeny

That looks like a floating point error due to the underlying library implementation. This test used to fail more often before tolerance was added (see also

Can you reproduce the failure on your machine ? — I can't on mine even if I run the test a hundred time.

comment:2 Changed 3 years ago by Simon Charette

Couldn't reproduce locally with 80 tries... I suggest we keep this ticket open as a reference until we figure out how to deal with this.

comment:3 Changed 3 years ago by Claude Paroz

I suspect an issue with ordering, but simply adding an order_by() will not be enough. The ST_MakeLine documentation suggests to solve this by using the PostgreSQL 9+ ORDER BY support for aggregates. So the proper fix might not be trivial.

comment:4 Changed 3 years ago by Thomas Chaumeny

That might be an explanation. What about adding some message like self.assertTrue(ref_line.equals_exact(line, tolerance=10e-5), "%s != %s" % (ref_line, line)) so that we can see the actual differences ?

comment:5 Changed 3 years ago by Claude Paroz <claude@…>

In fc3643743456e98ceb902ee1e48c1bc5f56034cf:

Added assertion error message for test_make_line

Refs #23842. Thanks Thomas Chaumeny for the suggestion.

comment:6 Changed 3 years ago by Thomas Chaumeny

Cc: t.chaumeny@… added

comment:7 Changed 2 months ago by Tim Graham

Resolution: worksforme
Status: newclosed

I haven't seen this failure recently.

comment:8 Changed 5 weeks ago by Tim Graham

Resolution: worksforme
Status: closednew

I saw this on Jenkins (a pull request to the master branch) today.

File "python3.6/tests/gis_tests/geoapp/", line 540, in test_make_line
    "%s != %s" % (ref_line, line)
AssertionError: False is not true :

SRID=4326;LINESTRING (-95.363151 29.763374, -96.80161099999999 32.782057, -97.521157 34.464642, 174.783117 -41.315268, -104.609252 38.255001, -95.23506 38.971823, -87.650175 41.850385, -123.305196 48.462611)
 SRID=4326;LINESTRING (-104.609252 38.255001, -95.23506 38.971823, -87.650175 41.850385, -123.305196 48.462611, -95.363151 29.763374, -96.80161099999999 32.782057, -97.521157 34.464642, 174.783117 -41.315268)
Note: See TracTickets for help on using tickets.
Back to Top