test_doctests

./lib/python/pygrass/modules/grid – test_doctests

Test failed

Testtest_doctests
Testsuite./lib/python/pygrass/modules/grid
Test file./lib/python/pygrass/modules/grid/testsuite/test_doctests.py
StatusFAILED
Return code1
Number of tests1
Successful tests0
Failed tests1
Percent successful0%
Test duration0:00:00.978511

Supplementary files

Standard error output (stderr)

/usr/lib/python2.7/xml/etree/ElementTree.py:1627: DeprecationWarning: This method of XMLParser is deprecated.  Define doctype() method on the TreeBuilder target.
  DeprecationWarning,

Description:
 Lists available GRASS data base files of the user-specified data type optionally using the search pattern.

Keywords:
 general, map management, list

Usage:
 g.list [-iretmpf] type=datatype[,datatype,...] [pattern=string]
   [exclude=string] [mapset=name[,name,...]] [separator=character]
   [region=name] [output=name] [--overwrite] [--help] [--verbose]
   [--quiet] [--ui]

Flags:
  -i   Ignore case
  -r   Use basic regular expressions instead of wildcards
  -e   Use extended regular expressions instead of wildcards
  -t   Print data types
  -m   Print fully-qualified map names (including mapsets)
  -p   Pretty printing in human readable format
  -f   Verbose listing (also list map titles)
 --o   Allow output files to overwrite existing files
 --h   Print usage summary
 --v   Verbose module output
 --q   Quiet module output
 --qq  Super quiet module output
 --ui  Force launching GUI dialog

Parameters:
       type   Data type(s)
              options: raster,raster_3d,vector,label,region,group,all
               raster: raster map(s)
               raster_3d: 3D raster map(s)
               vector: vector map(s)
               label: paint label file(s)
               region: region definition(s)
               group: imagery group(s)
               all: all types
    pattern   Map name search pattern (default: all)
    exclude   Map name exclusion pattern (default: none)
     mapset   Name of mapset to list (default: current search path)
               '.' for current mapset; '*' for all mapsets in location
  separator   Field separator
               Special characters: pipe, comma, space, tab, newline
              default: newline
     region   Name of saved region for map search (default: not restricted)
               '.' for current region; '*' for default region
     output   Name for output file
               If not given or '-' then standard output

ERROR: Required parameter <type> not set:
	(Data type(s))
F
======================================================================
FAIL: MetaModule (grass.pygrass.modules.shortcuts)
Doctest: grass.pygrass.modules.shortcuts.MetaModule
----------------------------------------------------------------------
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.modules.shortcuts.MetaModule
  File "etc/python/grass/pygrass/modules/shortcuts.py", line 14, in MetaModule

----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/shortcuts.py", line 23, in grass.pygrass.modules.shortcuts.MetaModule
Failed example:
    g_list.inputs.type = 'raster'
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.modules.shortcuts.MetaModule[4]>", line 1, in <module>
        g_list.inputs.type = 'raster'
      File "etc/python/grass/pygrass/modules/interface/typedict.py", line 30, in __setattr__
        self[key].value = value
      File "etc/python/grass/pygrass/modules/interface/parameter.py", line 189, in _set_value
        self._value, self._rawvalue = _check_value(self, value)
      File "etc/python/grass/pygrass/modules/interface/parameter.py", line 77, in _check_value
        check_string(value)
      File "etc/python/grass/pygrass/modules/interface/parameter.py", line 47, in check_string
        raise ValueError(msg % (param.name, type(value), value))
    ValueError: The Parameter <type> require a string, <type 'unicode'> instead is provided: u'raster'
----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/shortcuts.py", line 24, in grass.pygrass.modules.shortcuts.MetaModule
Failed example:
    g_list.inputs.mapset = 'PERMANENT'
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.modules.shortcuts.MetaModule[5]>", line 1, in <module>
        g_list.inputs.mapset = 'PERMANENT'
      File "etc/python/grass/pygrass/modules/interface/typedict.py", line 30, in __setattr__
        self[key].value = value
      File "etc/python/grass/pygrass/modules/interface/parameter.py", line 189, in _set_value
        self._value, self._rawvalue = _check_value(self, value)
      File "etc/python/grass/pygrass/modules/interface/parameter.py", line 77, in _check_value
        check_string(value)
      File "etc/python/grass/pygrass/modules/interface/parameter.py", line 47, in check_string
        raise ValueError(msg % (param.name, type(value), value))
    ValueError: The Parameter <mapset> require a string, <type 'unicode'> instead is provided: u'PERMANENT'
----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/shortcuts.py", line 26, in grass.pygrass.modules.shortcuts.MetaModule
Failed example:
    g_list.run()
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.modules.shortcuts.MetaModule[7]>", line 1, in <module>
        g_list.run()
      File "etc/python/grass/pygrass/modules/interface/module.py", line 713, in run
        module=self.name, errors=stderr)
      File "etc/python/grass/exceptions/__init__.py", line 68, in __init__
        msg = _("Module run %s %s ended with error") % (module, code)
    TypeError: 'list' object is not callable
----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/shortcuts.py", line 28, in grass.pygrass.modules.shortcuts.MetaModule
Failed example:
    g_list.outputs.stdout                         # doctest: +ELLIPSIS
Expected:
    '...basin...soils...'
Got:
    u''
----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/shortcuts.py", line 34, in grass.pygrass.modules.shortcuts.MetaModule
Failed example:
    what.inputs.map = '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.modules.shortcuts.MetaModule[12]>", line 1, in <module>
        what.inputs.map = 'elevation'
      File "etc/python/grass/pygrass/modules/interface/typedict.py", line 30, in __setattr__
        self[key].value = value
      File "etc/python/grass/pygrass/modules/interface/parameter.py", line 189, in _set_value
        self._value, self._rawvalue = _check_value(self, value)
      File "etc/python/grass/pygrass/modules/interface/parameter.py", line 77, in _check_value
        check_string(value)
      File "etc/python/grass/pygrass/modules/interface/parameter.py", line 47, in check_string
        raise ValueError(msg % (param.name, type(value), value))
    ValueError: The Parameter <map> require a string, <type 'unicode'> instead is provided: u'elevation'


----------------------------------------------------------------------
Ran 1 test in 0.090s
FAILED (failures=1)