[py-svn] r57101 - in py/branch/event/py/test2/rsession: . testing
hpk at codespeak.net
hpk at codespeak.net
Fri Aug 8 15:50:50 CEST 2008
Author: hpk
Date: Fri Aug 8 15:50:48 2008
New Revision: 57101
Modified:
py/branch/event/py/test2/rsession/pickle.py
py/branch/event/py/test2/rsession/testing/test_pickle.py
Log:
add various proxy methods
Modified: py/branch/event/py/test2/rsession/pickle.py
==============================================================================
--- py/branch/event/py/test2/rsession/pickle.py (original)
+++ py/branch/event/py/test2/rsession/pickle.py Fri Aug 8 15:50:48 2008
@@ -63,8 +63,17 @@
return pickled_obj
return self._ipickle.loads(pickled_obj)
- def waitclose(self):
- return self._channel.waitclose()
+ def _getremoteerror(self):
+ return self._channel._getremoteerror()
+
+ def close(self):
+ return self._channel.close()
+
+ def isclosed(self):
+ return self._channel.isclosed()
+
+ def waitclose(self, timeout=None):
+ return self._channel.waitclose(timeout=timeout)
def setcallback(self, callback, endmarker=NO_ENDMARKER_WANTED):
if endmarker is NO_ENDMARKER_WANTED:
Modified: py/branch/event/py/test2/rsession/testing/test_pickle.py
==============================================================================
--- py/branch/event/py/test2/rsession/testing/test_pickle.py (original)
+++ py/branch/event/py/test2/rsession/testing/test_pickle.py Fri Aug 8 15:50:48 2008
@@ -110,3 +110,16 @@
channel.waitclose()
res = newchannel.receive()
assert res == 42
+
+ def test_popen_with_various_methods(self):
+ channel = self.gw.remote_exec("""
+ from py.__.test2.rsession.pickle import PickleChannel
+ channel = PickleChannel(channel)
+ channel.receive()
+ """)
+ channel = PickleChannel(channel)
+ assert not channel.isclosed()
+ assert not channel._getremoteerror()
+ channel.send(2)
+ channel.waitclose(timeout=2)
+
More information about the pytest-commit
mailing list