[pypy-svn] rev 429 - pypy/trunk/src/pypy/objspace/std/test
pedronis at codespeak.net
pedronis at codespeak.net
Mon May 26 12:58:25 CEST 2003
Author: pedronis
Date: Mon May 26 12:58:25 2003
New Revision: 429
Modified:
pypy/trunk/src/pypy/objspace/std/test/test_dictobject.py
Log:
added test for cell method
Modified: pypy/trunk/src/pypy/objspace/std/test/test_dictobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/test/test_dictobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/test/test_dictobject.py Mon May 26 12:58:25 2003
@@ -46,6 +46,17 @@
self.assertEqual_w(space.getitem(d,space.wrap('two')),space.wrap(2))
self.failUnlessRaises(OperationError,space.getitem,d,space.wrap('one'))
+ def test_cell(self):
+ space = self.space
+ wk1 = space.wrap('key')
+ d = dobj.W_DictObject([])
+ w_cell = d.cell(space,wk1)
+ cell = space.unwrap(w_cell)
+ self.failUnless(cell.is_empty())
+ cell.set(space.wrap(1))
+ self.assertEqual_w(space.getitem(d,wk1),space.wrap(1))
+
+
if __name__ == '__main__':
unittest.main()
More information about the Pypy-commit
mailing list