test_doctests

./lib/python/pygrass – test_doctests

Test failed

Testtest_doctests
Testsuite./lib/python/pygrass
Test file./lib/python/pygrass/testsuite/test_doctests.py
StatusFAILED
Return code1
Number of tests11
Successful tests8
Failed tests3
Percent successful73%
Test duration0:00:01.133566

Supplementary files

Standard error output (stderr)

etc/python/grass/lib/gis.py:801: DeprecationWarning: classic int division
  ('__val', c_ulong * (1024 / (8 * sizeof(c_ulong)))),
.WARNING: <census> not found
WARNING: vector <mycensus> not found
..FF/usr/lib/python2.7/dist-packages/numpy/core/__init__.py:6: DeprecationWarning: CObject type is not supported in 3.x. Please use capsule objects instead.
  from . import multiarray
/usr/lib/python2.7/dist-packages/numpy/core/__init__.py:7: DeprecationWarning: CObject type is not supported in 3.x. Please use capsule objects instead.
  from . import umath
WARNING: <schools> not found
F.WARNING: Illegal filename <c√©nsus>. Character <√> not allowed.

....
======================================================================
FAIL: get_mapset_raster (grass.pygrass.utils)
Doctest: grass.pygrass.utils.get_mapset_raster
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for grass.pygrass.utils.get_mapset_raster
  File "etc/python/grass/pygrass/utils.py", line 127, in get_mapset_raster

----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 130, in grass.pygrass.utils.get_mapset_raster
Failed example:
    get_mapset_raster('elevation')
Expected:
    'PERMANENT'
Got nothing


======================================================================
FAIL: get_mapset_vector (grass.pygrass.utils)
Doctest: grass.pygrass.utils.get_mapset_vector
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for grass.pygrass.utils.get_mapset_vector
  File "etc/python/grass/pygrass/utils.py", line 137, in get_mapset_vector

----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 140, in grass.pygrass.utils.get_mapset_vector
Failed example:
    get_mapset_vector('census')
Expected:
    'PERMANENT'
Got nothing


======================================================================
FAIL: get_raster_for_points (grass.pygrass.utils)
Doctest: grass.pygrass.utils.get_raster_for_points
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for grass.pygrass.utils.get_raster_for_points
  File "etc/python/grass/pygrass/utils.py", line 197, in get_raster_for_points

----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 207, in grass.pygrass.utils.get_raster_for_points
Failed example:
    sch.open(mode='r')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest grass.pygrass.utils.get_raster_for_points[5]>", line 1, in <module>
        sch.open(mode='r')
      File "etc/python/grass/pygrass/vector/abstract.py", line 338, in open
        raise OpenError("Map <%s> not found." % self._name)
    OpenError: Map <myschools> not found.
----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 208, in grass.pygrass.utils.get_raster_for_points
Failed example:
    get_raster_for_points(sch, ele)               # doctest: +ELLIPSIS
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest grass.pygrass.utils.get_raster_for_points[6]>", line 1, in <module>
        get_raster_for_points(sch, ele)               # doctest: +ELLIPSIS
      File "etc/python/grass/pygrass/utils.py", line 235, in get_raster_for_points
        poi_vector.open()
      File "etc/python/grass/pygrass/vector/abstract.py", line 338, in open
        raise OpenError("Map <%s> not found." % self._name)
    OpenError: Map <myschools> not found.
----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 210, in grass.pygrass.utils.get_raster_for_points
Failed example:
    sch.table.columns.add('elevation','double precision')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest grass.pygrass.utils.get_raster_for_points[7]>", line 1, in <module>
        sch.table.columns.add('elevation','double precision')
    AttributeError: 'VectorTopo' object has no attribute 'table'
----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 211, in grass.pygrass.utils.get_raster_for_points
Failed example:
    'elevation' in sch.table.columns
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest grass.pygrass.utils.get_raster_for_points[8]>", line 1, in <module>
        'elevation' in sch.table.columns
    AttributeError: 'VectorTopo' object has no attribute 'table'
----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 213, in grass.pygrass.utils.get_raster_for_points
Failed example:
    get_raster_for_points(sch, ele, column='elevation')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest grass.pygrass.utils.get_raster_for_points[9]>", line 1, in <module>
        get_raster_for_points(sch, ele, column='elevation')
      File "etc/python/grass/pygrass/utils.py", line 235, in get_raster_for_points
        poi_vector.open()
      File "etc/python/grass/pygrass/vector/abstract.py", line 338, in open
        raise OpenError("Map <%s> not found." % self._name)
    OpenError: Map <myschools> not found.
----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 215, in grass.pygrass.utils.get_raster_for_points
Failed example:
    sch.table.filters.select('NAMESHORT','elevation')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest grass.pygrass.utils.get_raster_for_points[10]>", line 1, in <module>
        sch.table.filters.select('NAMESHORT','elevation')
    AttributeError: 'VectorTopo' object has no attribute 'table'
----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 217, in grass.pygrass.utils.get_raster_for_points
Failed example:
    cur = sch.table.execute()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest grass.pygrass.utils.get_raster_for_points[11]>", line 1, in <module>
        cur = sch.table.execute()
    AttributeError: 'VectorTopo' object has no attribute 'table'
----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 218, in grass.pygrass.utils.get_raster_for_points
Failed example:
    cur.fetchall()                                # doctest: +ELLIPSIS
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest grass.pygrass.utils.get_raster_for_points[12]>", line 1, in <module>
        cur.fetchall()                                # doctest: +ELLIPSIS
    NameError: name 'cur' is not defined


----------------------------------------------------------------------
Ran 11 tests in 0.241s
FAILED (failures=3)