pombreda / pysal

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

pysal.cg.locators fails doctests #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. From the cg directory, run 'python locators.py' to execute the local 
doctests.
2.
3.

What is the expected output? What do you see instead?

We expect no failed items, instead we fail two tests.

Please use labels and text to provide additional information.

PYSAL.CG.LOCATORS FAILS LOCAL DOCTESTS

pysal.cg.locators.py fails its doctests when run locally, but is not reported 
in system doctests.
**********************************************************************
File "locators.py", line 705, in __main__.PolygonLocator.nearest
Failed example:
    str(min(n.vertices()))
Exception raised:
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/6.3/lib/python2.6/doctest.py", line 1253, 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'
**********************************************************************
File "locators.py", line 768, 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/6.3/lib/python2.6/doctest.py", line 1253, 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() 

Original issue reported on code.google.com by phil.stp...@gmail.com on 11 Jan 2011 at 6:42

GoogleCodeExporter commented 9 years ago

Original comment by sjsrey on 18 Jan 2011 at 4:22

GoogleCodeExporter commented 9 years ago
The tests fail because the methods haven't been implemented yet.  I create a 
new ticket to deal with the issue. #134

Original comment by schmi...@gmail.com on 19 Jan 2011 at 7:09