pombreda / pysal

Automatically exported from code.google.com/p/pysal
Other
0 stars 0 forks source link

cg.locators failing doctests #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
**********************************************************************
File "locators.py", line 633, in __main__.PolygonLocator.nearest
Failed example:
    str(min(n.vertices()))
Exception raised:
    Traceback (most recent call last):
      File
"/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/doctest.py",
line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__.PolygonLocator.nearest[4]>", line 1, in <module>
        str(min(n.vertices()))
    AttributeError: 'NoneType' object has no attribute 'vertices'
Trying:
    p1 = Polygon([Point((0, 1)), Point((4, 5)), Point((5, 1))])
Expecting nothing
ok
Trying:
    p2 = Polygon([Point((3, 9)), Point((6, 7)), Point((1, 1))])
Expecting nothing
ok
Trying:
    pl = PolygonLocator([p1, p2])
Expecting nothing
ok
Trying:
    len(pl.proximity(Point((0, 0)), 2))
Expecting:
    2
**********************************************************************
File "locators.py", line 671, in __main__.PolygonLocator.proximity
Failed example:
    len(pl.proximity(Point((0, 0)), 2))
Exception raised:
    Traceback (most recent call last):
      File
"/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/doctest.py",
line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__.PolygonLocator.proximity[3]>", line 1, in
<module>
        len(pl.proximity(Point((0, 0)), 2))
    TypeError: object of type 'NoneType' has no len()
Trying:
    p1 = Polygon([Point((0, 1)), Point((4, 5)), Point((5, 1))])
Expecting nothing
ok
Trying:
    p2 = Polygon([Point((3, 9)), Point((6, 7)), Point((1, 1))])
Expecting nothing
ok
Trying:
    pl = PolygonLocator([p1, p2])
Expecting nothing
ok
Trying:
    n = pl.region(Rectangle(0, 0, 4, 10))
Expecting nothing
ok
Trying:
    len(n)
Expecting:
    2
**********************************************************************
File "locators.py", line 652, in __main__.PolygonLocator.region
Failed example:
    len(n)
Exception raised:
    Traceback (most recent call last):
      File
"/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/doctest.py",
line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__.PolygonLocator.region[4]>", line 1, in <module>
        len(n)
    TypeError: object of type 'NoneType' has no len()

Original issue reported on code.google.com by sjsrey on 14 Dec 2009 at 5:06

GoogleCodeExporter commented 9 years ago

Original comment by sjsrey on 25 Jan 2010 at 7:01

GoogleCodeExporter commented 9 years ago
so the methods need to be implemented it would seem

Original comment by sjsrey on 25 Feb 2010 at 11:57

GoogleCodeExporter commented 9 years ago

Original comment by sjsrey on 26 Feb 2010 at 12:02