[GRASS-SVN] r69506 - grass/trunk/lib/python/pygrass/rpc
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 16 08:35:48 PDT 2016
Author: huhabla
Date: 2016-09-16 08:35:48 -0700 (Fri, 16 Sep 2016)
New Revision: 69506
Modified:
grass/trunk/lib/python/pygrass/rpc/__init__.py
grass/trunk/lib/python/pygrass/rpc/base.py
Log:
pygrass cpr: Fixed tests, needed to add sleep(1) to wait for the server to stop
Modified: grass/trunk/lib/python/pygrass/rpc/__init__.py
===================================================================
--- grass/trunk/lib/python/pygrass/rpc/__init__.py 2016-09-16 15:23:53 UTC (rev 69505)
+++ grass/trunk/lib/python/pygrass/rpc/__init__.py 2016-09-16 15:35:48 UTC (rev 69506)
@@ -260,6 +260,7 @@
.. code-block:: python
>>> from grass.pygrass.rpc import DataProvider
+ >>> import time
>>> provider = DataProvider()
>>> ret = provider.get_raster_image_as_np(name=test_raster_name)
>>> len(ret)
@@ -284,6 +285,7 @@
... extent=extent)
>>> provider.stop()
+ >>> time.sleep(1)
>>> extent = {"rows":3, "cols":1}
>>> ret = provider.get_raster_image_as_np(name=test_raster_name,
Modified: grass/trunk/lib/python/pygrass/rpc/base.py
===================================================================
--- grass/trunk/lib/python/pygrass/rpc/base.py 2016-09-16 15:23:53 UTC (rev 69505)
+++ grass/trunk/lib/python/pygrass/rpc/base.py 2016-09-16 15:35:48 UTC (rev 69506)
@@ -47,6 +47,7 @@
>>> import grass.script as gscript
>>> from grass.pygrass.rpc.base import RPCServerBase
+ >>> import time
>>> provider = RPCServerBase()
>>> provider.is_server_alive()
@@ -56,6 +57,7 @@
True
>>> provider.stop()
+ >>> time.sleep(1)
>>> provider.is_server_alive()
False
More information about the grass-commit
mailing list