test_doctests

./lib/python/pygrass – test_doctests

Test failed

Test filetest_doctests
Testsuite./lib/python/pygrass
StatusFAILED
Return code1
Number of tests12
Successful tests7
Failed tests5
Percent successful58%
Test duration0:00:01.168979

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.functions.get_raster_for_points[12]>", line 1, in <module>
        cur.fetchall()                                # doctest: +ELLIPSIS
    NameError: name 'cur' is not defined


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

----------------------------------------------------------------------
File "etc/python/grass/pygrass/functions.py", line 124, in grass.pygrass.functions.getenv
Failed example:
    getenv("MAPSET")
Expected:
    'user1'
Got:
    '__lib_python_pygrass_test_doctests'


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

----------------------------------------------------------------------
File "etc/python/grass/pygrass/functions.py", line 158, in grass.pygrass.functions.is_clean_name
Failed example:
    is_clean_name('census?')
Expected:
    False
Got:
    True


----------------------------------------------------------------------
Ran 12 tests in 0.123s
FAILED (failures=5)