test_doctests

./lib/python/pygrass/raster – test_doctests

Test failed

Testtest_doctests
Testsuite./lib/python/pygrass/raster
Test file./lib/python/pygrass/raster/testsuite/test_doctests.py
StatusFAILED
Return code1
Number of tests12
Successful tests11
Failed tests1
Percent successful92%
Test duration0:00:01.164812

Supplementary files

Standard error output (stderr)

/usr/lib/python2.7/dist-packages/numpy/core/__init__.py:14: 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:21: DeprecationWarning: CObject type is not supported in 3.x. Please use capsule objects instead.
  from . import umath
/usr/lib/python2.7/dist-packages/numpy/random/__init__.py:99: DeprecationWarning: CObject type is not supported in 3.x. Please use capsule objects instead.
  from .mtrand import *
etc/python/grass/pygrass/raster/history.py:13: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class History(object):
/usr/lib/python2.7/xml/etree/ElementTree.py:1638: DeprecationWarning: This method of XMLParser is deprecated.  Define doctype() method on the TreeBuilder target.
  DeprecationWarning,
F..etc/python/grass/pygrass/raster/segment.py:30: DeprecationWarning: classic int division
  return ((rows + self.srows - 1) / self.srows) * \
etc/python/grass/pygrass/raster/segment.py:31: DeprecationWarning: classic int division
  ((cols + self.scols - 1) / self.scols)
.........
======================================================================
FAIL: RasterRow (grass.pygrass.raster)
Doctest: grass.pygrass.raster.RasterRow
----------------------------------------------------------------------
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.raster.RasterRow
  File "etc/python/grass/pygrass/raster/__init__.py", line 39, in RasterRow

----------------------------------------------------------------------
File "etc/python/grass/pygrass/raster/__init__.py", line 101, in grass.pygrass.raster.RasterRow
Failed example:
    elev.cats          # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
Expected:
    [('A', 11, None),
     ('B', 12, None),
    ...
     ('P', 44, None)]
Got:
    [(u'A', 11, None),
     (u'B', 12, None),
     (u'C', 13, None),
     (u'D', 14, None),
     (u'E', 21, None),
     (u'F', 22, None),
     (u'G', 23, None),
     (u'H', 24, None),
     (u'I', 31, None),
     (u'J', 32, None),
     (u'K', 33, None),
     (u'L', 34, None),
     (u'M', 41, None),
     (u'n', 42, None),
     (u'O', 43, None),
     (u'P', 44, None)]
----------------------------------------------------------------------
File "etc/python/grass/pygrass/raster/__init__.py", line 107, in grass.pygrass.raster.RasterRow
Failed example:
    elev.cats.labels() # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
Expected:
    ['A', 'B', 'C', 'D', 'E',
     'F', 'G', 'H', 'I', 'J',
     'K', 'L', 'M', 'n', 'O', 'P']
Got:
    [u'A', u'B', u'C', u'D', u'E', u'F', u'G', u'H', u'I', u'J', u'K', u'L', u'M', u'n', u'O', u'P']
----------------------------------------------------------------------
File "etc/python/grass/pygrass/raster/__init__.py", line 111, in grass.pygrass.raster.RasterRow
Failed example:
    elev.cats[0]
Expected:
    ('A', 11, None)
Got:
    (u'A', 11, None)
----------------------------------------------------------------------
File "etc/python/grass/pygrass/raster/__init__.py", line 113, in grass.pygrass.raster.RasterRow
Failed example:
    elev.cats[2]
Expected:
    ('C', 13, None)
Got:
    (u'C', 13, None)
----------------------------------------------------------------------
File "etc/python/grass/pygrass/raster/__init__.py", line 119, in grass.pygrass.raster.RasterRow
Failed example:
    elev.cats[0]
Expected:
    ('AA', 11, None)
Got:
    (u'AA', 11, None)
----------------------------------------------------------------------
File "etc/python/grass/pygrass/raster/__init__.py", line 121, in grass.pygrass.raster.RasterRow
Failed example:
    elev.cats[1]
Expected:
    ('BB', 12, None)
Got:
    (u'BB', 12, None)


----------------------------------------------------------------------
Ran 12 tests in 0.065s
FAILED (failures=1)