[pypy-svn] r42400 - pypy/dist/pypy/lib/distributed/test
fijal at codespeak.net
fijal at codespeak.net
Sat Apr 28 19:22:02 CEST 2007
Author: fijal
Date: Sat Apr 28 19:22:02 2007
New Revision: 42400
Modified:
pypy/dist/pypy/lib/distributed/test/test_distributed.py
Log:
Add another test for descriptors. It's passing, but just to be sure.
Modified: pypy/dist/pypy/lib/distributed/test/test_distributed.py
==============================================================================
--- pypy/dist/pypy/lib/distributed/test/test_distributed.py (original)
+++ pypy/dist/pypy/lib/distributed/test/test_distributed.py Sat Apr 28 19:22:02 2007
@@ -262,3 +262,20 @@
xf = protocol.get_remote('f')
data = xf('/etc/passwd').read()
assert data
+
+ def test_real_descriptor(self):
+ class getdesc(object):
+ def __get__(self, obj, val=None):
+ if obj is not None:
+ assert type(obj) is X
+ return 3
+
+ class X(object):
+ x = getdesc()
+
+ x = X()
+
+ protocol = self.test_env({'x':x})
+ xx = protocol.get_remote('x')
+ assert xx.x == 3
+
More information about the Pypy-commit
mailing list