Opened 3 years ago

Last modified 3 years 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 (6)

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
Note: See TracTickets for help on using tickets.
Back to Top