test_doctests

./lib/python/pygrass/modules – test_doctests

Test failed

Test filetest_doctests
Testsuite./lib/python/pygrass/modules
StatusFAILED
Return code1
Number of tests7
Successful tests3
Failed tests4
Percent successful43%
Test duration0:00:01.400362

Supplementary files

Standard error output (stderr)

etc/python/grass/lib/gis.py:803: DeprecationWarning: classic int division
  ('__val', c_ulong * (1024 / (8 * sizeof(c_ulong)))),
/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
/usr/lib/python2.7/xml/etree/ElementTree.py:1627: DeprecationWarning: This method of XMLParser is deprecated.  Define doctype() method on the TreeBuilder target.
  DeprecationWarning,
FF.F..F
======================================================================
FAIL: GridModule (grass.pygrass.modules.grid.grid)
Doctest: grass.pygrass.modules.grid.grid.GridModule
----------------------------------------------------------------------
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.grid.grid.GridModule
  File "etc/python/grass/pygrass/modules/grid/grid.py", line 376, in GridModule

----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/grid/grid.py", line 401, in grass.pygrass.modules.grid.grid.GridModule
Failed example:
    grd.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.grid.grid.GridModule[1]>", line 1, in <module>
        grd.run()
      File "etc/python/grass/pygrass/modules/grid/grid.py", line 543, in run
        raise RuntimeError(_("Execution of subprocesses was not successful"))
    RuntimeError: Execution of subprocesses was not successful


======================================================================
FAIL: copy_mapset (grass.pygrass.modules.grid.grid)
Doctest: grass.pygrass.modules.grid.grid.copy_mapset
----------------------------------------------------------------------
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.grid.grid.copy_mapset
  File "etc/python/grass/pygrass/modules/grid/grid.py", line 67, in copy_mapset

----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/grid/grid.py", line 78, in grass.pygrass.modules.grid.grid.copy_mapset
Failed example:
    mset.name
Expected:
    'user1'
Got:
    '__lib_python_pygrass_modules_test_doctests'
----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/grid/grid.py", line 83, in grass.pygrass.modules.grid.grid.copy_mapset
Failed example:
    copy_mapset(mset, path)
Expected:
    Mapset('user1')
Got:
    Mapset('__lib_python_pygrass_modules_test_doctests')
----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/grid/grid.py", line 85, in grass.pygrass.modules.grid.grid.copy_mapset
Failed example:
    sorted(os.listdir(path))
Expected:
    [u'PERMANENT', u'user1']
Got:
    [u'PERMANENT', u'__lib_python_pygrass_modules_test_doctests']
----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/grid/grid.py", line 87, in grass.pygrass.modules.grid.grid.copy_mapset
Failed example:
    sorted(os.listdir(os.path.join(path, 'PERMANENT')))
Expected:
    [u'DEFAULT_WIND', u'PROJ_INFO', u'PROJ_UNITS', u'VAR', u'WIND']
Got:
    [u'CURGROUP', u'DEFAULT_WIND', u'MYNAME', u'PROJ_INFO', u'PROJ_UNITS', u'VAR', u'WIND']
----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/grid/grid.py", line 89, in grass.pygrass.modules.grid.grid.copy_mapset
Failed example:
    sorted(os.listdir(os.path.join(path, 'user1'))) # 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.modules.grid.grid.copy_mapset[8]>", line 1, in <module>
        sorted(os.listdir(os.path.join(path, 'user1'))) # doctest: +ELLIPSIS
    OSError: [Errno 2] No such file or directory: '/tmp/my_loc/my_mset/user1'


======================================================================
FAIL: read_gisrc (grass.pygrass.modules.grid.grid)
Doctest: grass.pygrass.modules.grid.grid.read_gisrc
----------------------------------------------------------------------
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.grid.grid.read_gisrc
  File "etc/python/grass/pygrass/modules/grid/grid.py", line 109, in read_gisrc

----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/grid/grid.py", line 118, in grass.pygrass.modules.grid.grid.read_gisrc
Failed example:
    read_gisrc(os.environ['GISRC'])  # doctest: +ELLIPSIS
Expected:
    (u'user1', ...)
Got:
    (u'__lib_python_pygrass_modules_test_doctests', u'piemonte_utm32_wgs84_grass7', u'/grassdata/tests-grassdata')


======================================================================
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 19, in MetaModule

----------------------------------------------------------------------
File "etc/python/grass/pygrass/modules/shortcuts.py", line 32, in grass.pygrass.modules.shortcuts.MetaModule
Failed example:
    g_list.outputs.stdout                         # doctest: +ELLIPSIS
Expected:
    '...basins...soils...'
Got:
    u''


----------------------------------------------------------------------
Ran 7 tests in 0.174s
FAILED (failures=4)