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 tests10
Successful tests6
Failed tests4
Percent successful60%
Test duration0:00:01.307738

Supplementary files

Standard error output (stderr)

... (lines omitted)
      File "/usr/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest grass.pygrass.utils.is_clean_name[3]>", line 1, in <module>
        is_clean_name('cénsus')
      File "etc/python/grass/pygrass/utils.py", line 163, in is_clean_name
        if libgis.G_legal_filename(name) < 0:
    ArgumentError: argument 1: <type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)


======================================================================
FAIL: pixel2coor (grass.pygrass.utils)
Doctest: grass.pygrass.utils.pixel2coor
----------------------------------------------------------------------
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.pixel2coor
  File "etc/python/grass/pygrass/utils.py", line 184, in pixel2coor

----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 189, in grass.pygrass.utils.pixel2coor
Failed example:
    pixel2coor((0, 0), reg) == (reg.north, reg.west)
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.pixel2coor[2]>", line 1, in <module>
        pixel2coor((0, 0), reg) == (reg.north, reg.west)
      File "etc/python/grass/pygrass/utils.py", line 196, in pixel2coor
        return (libraster.Rast_row_to_northing(row, region.byref()),
    ArgumentError: argument 2: <type 'exceptions.TypeError'>: expected LP_struct_Cell_head instance instead of LP_struct_Cell_head
----------------------------------------------------------------------
File "etc/python/grass/pygrass/utils.py", line 191, in grass.pygrass.utils.pixel2coor
Failed example:
    pixel2coor((reg.cols, reg.rows), reg) == (reg.south, reg.east)
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.pixel2coor[3]>", line 1, in <module>
        pixel2coor((reg.cols, reg.rows), reg) == (reg.south, reg.east)
      File "etc/python/grass/pygrass/utils.py", line 196, in pixel2coor
        return (libraster.Rast_row_to_northing(row, region.byref()),
    ArgumentError: argument 2: <type 'exceptions.TypeError'>: expected LP_struct_Cell_head instance instead of LP_struct_Cell_head


----------------------------------------------------------------------
Ran 10 tests in 0.329s
FAILED (failures=4)