[GRASS-SVN] r61990 - in grass/trunk/lib/python/pygrass: . messages vector
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 16 01:05:08 PDT 2014
Author: lucadelu
Date: 2014-09-16 01:05:08 -0700 (Tue, 16 Sep 2014)
New Revision: 61990
Modified:
grass/trunk/lib/python/pygrass/functions.py
grass/trunk/lib/python/pygrass/messages/__init__.py
grass/trunk/lib/python/pygrass/vector/abstract.py
Log:
pygrass: fix some doctests
Modified: grass/trunk/lib/python/pygrass/functions.py
===================================================================
--- grass/trunk/lib/python/pygrass/functions.py 2014-09-16 08:04:33 UTC (rev 61989)
+++ grass/trunk/lib/python/pygrass/functions.py 2014-09-16 08:05:08 UTC (rev 61990)
@@ -206,7 +206,7 @@
>>> ele = RasterRow('elevation')
>>> copy('schools','myschools','vect')
>>> sch = VectorTopo('myschools')
- >>> sch.open()
+ >>> sch.open(mode='r')
>>> get_raster_for_points(sch, ele) # doctest: +ELLIPSIS
[(1, 633649.2856743174, 221412.94434781274, 145.06602)...
>>> sch.table.columns.add('elevation','double precision')
Modified: grass/trunk/lib/python/pygrass/messages/__init__.py
===================================================================
--- grass/trunk/lib/python/pygrass/messages/__init__.py 2014-09-16 08:04:33 UTC (rev 61989)
+++ grass/trunk/lib/python/pygrass/messages/__init__.py 2014-09-16 08:05:08 UTC (rev 61990)
@@ -130,12 +130,6 @@
>>> msgr.percent(1, 1, 1)
>>> msgr.warning("Ohh")
>>> msgr.error("Ohh no")
- D0/0: debug 0
- message
- important message
- 100%
- WARNING: Ohh
- ERROR: Ohh no
>>> msgr = Messenger()
>>> msgr.fatal("Ohh no no no!")
Modified: grass/trunk/lib/python/pygrass/vector/abstract.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/abstract.py 2014-09-16 08:04:33 UTC (rev 61989)
+++ grass/trunk/lib/python/pygrass/vector/abstract.py 2014-09-16 08:05:08 UTC (rev 61990)
@@ -31,7 +31,7 @@
To get access to the vector info the map must be opened. ::
>>> cens = Info('census')
- >>> cens.open()
+ >>> cens.open(mode='r')
Then it is possible to read and write the following map attributes: ::
More information about the grass-commit
mailing list