FTBFS when building with python 2.7 owing to test faliures

Bug #721756 reported by Sameer Morar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-shapely (Ubuntu)
Fix Released
Medium
Artur Rona

Bug Description

Binary package hint: python-shapely

The following tests fail when built with python 2.7 owing to changes in the conversions from long integers and regular integers to floating points referred to here: http://docs.python.org/dev/whatsnew/2.7.html

======================================================================
FAIL: /tmp/buildd/python-shapely-1.2.1/shapely/tests/Point.txt
Doctest: Point.txt
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2166, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for Point.txt
  File "/tmp/buildd/python-shapely-1.2.1/shapely/tests/Point.txt", line 0

----------------------------------------------------------------------
File "/tmp/buildd/python-shapely-1.2.1/shapely/tests/Point.txt", line 124, in Point.txt
Failed example:
    pa.distance(p)
Expected:
    4.1231056256176606
Got:
    4.123105625617661

======================================================================
FAIL: /tmp/buildd/python-shapely-1.2.1/shapely/tests/MultiPolygon.txt
Doctest: MultiPolygon.txt
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2166, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for MultiPolygon.txt
  File "/tmp/buildd/python-shapely-1.2.1/shapely/tests/MultiPolygon.txt", line 0

----------------------------------------------------------------------
File "/tmp/buildd/python-shapely-1.2.1/shapely/tests/MultiPolygon.txt", line 53, in MultiPolygon.txt
Failed example:
    geom.__geo_interface__
Expected:
    {'type': 'MultiPolygon', 'coordinates': [[((0.0, 0.0), (0.0, 1.0), (1.0, 1.0), (1.0, 0.0), (0.0, 0.0)), ((0.10000000000000001, 0.10000000000000001), (0.10000000000000001, 0.20000000000000001), (0.20000000000000001, 0.20000000000000001), (0.20000000000000001, 0.10000000000000001), (0.10000000000000001, 0.10000000000000001))]]}
Got:
    {'type': 'MultiPolygon', 'coordinates': [[((0.0, 0.0), (0.0, 1.0), (1.0, 1.0), (1.0, 0.0), (0.0, 0.0)), ((0.1, 0.1), (0.1, 0.2), (0.2, 0.2), (0.2, 0.1), (0.1, 0.1))]]}

======================================================================
FAIL: /tmp/buildd/python-shapely-1.2.1/shapely/tests/Polygon.txt
Doctest: Polygon.txt
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2166, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for Polygon.txt
  File "/tmp/buildd/python-shapely-1.2.1/shapely/tests/Polygon.txt", line 0

----------------------------------------------------------------------
File "/tmp/buildd/python-shapely-1.2.1/shapely/tests/Polygon.txt", line 105, in Polygon.txt
Failed example:
    polygon.__geo_interface__
Expected:
    {'type': 'Polygon', 'coordinates': (((0.0, 0.0), (0.0, 1.0), (1.0, 1.0), (2.0, -1.0), (0.0, 0.0)), ((0.10000000000000001, 0.10000000000000001), (0.10000000000000001, 0.20000000000000001), (0.20000000000000001, 0.20000000000000001), (0.20000000000000001, 0.10000000000000001), (0.10000000000000001, 0.10000000000000001)))}
Got:
    {'type': 'Polygon', 'coordinates': (((0.0, 0.0), (0.0, 1.0), (1.0, 1.0), (2.0, -1.0), (0.0, 0.0)), ((0.1, 0.1), (0.1, 0.2), (0.2, 0.2), (0.2, 0.1), (0.1, 0.1)))}

----------------------------------------------------------------------

Revision history for this message
Sameer Morar (smorar) wrote :
tags: added: patch patch-forwarded-upstream
Changed in python-shapely (Ubuntu):
status: New → Confirmed
Revision history for this message
Sameer Morar (smorar) wrote :

Bug has been reported upstream here:
http://trac.gispython.org/lab/ticket/248

Artur Rona (ari-tczew)
Changed in python-shapely (Ubuntu):
assignee: nobody → Artur Rona (ari-tczew)
status: Confirmed → In Progress
Felix Geyer (debfx)
tags: added: python27
Revision history for this message
Artur Rona (ari-tczew) wrote :

While building the source I got some errors related to python 2.6. Would be nice to get it fixed upstream.
I added minor changes to DEP3 tags, e.g. Bug-Ubuntu tag.

Thank you for your contribution!

Changed in python-shapely (Ubuntu):
importance: Undecided → Medium
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-shapely - 1.2.1-2ubuntu1

---------------
python-shapely (1.2.1-2ubuntu1) natty; urgency=low

  * debian/patches/python-2.7-testfixes.patch: Update test results to account
    for changes to conversions from long integers and regular integers to
    floating points in python 2.7. (LP: #721756)
 -- Sameer Morar <email address hidden> Sat, 19 Feb 2011 14:57:46 +0200

Changed in python-shapely (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.