[pypy-svn] rev 643 - pypy/trunk/src/pypy/interpreter/test
mwh at codespeak.net
mwh at codespeak.net
Thu May 29 11:34:35 CEST 2003
Author: mwh
Date: Thu May 29 11:34:35 2003
New Revision: 643
Modified:
pypy/trunk/src/pypy/interpreter/test/test_objspace.py
Log:
add test_is_true
Modified: pypy/trunk/src/pypy/interpreter/test/test_objspace.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/test/test_objspace.py (original)
+++ pypy/trunk/src/pypy/interpreter/test/test_objspace.py Thu May 29 11:34:35 2003
@@ -1,5 +1,8 @@
import testsupport
+# this test isn't so much to test that the objspace interface *works*
+# -- it's more to test that it's *there*
+
class TestStdObjectSpace(testsupport.TestCase):
def setUp(self):
@@ -44,6 +47,15 @@
t = tuple(range(10))
w_t = self.space.newtuple([w(i) for i in t])
self.assertEqual_w(w_t, w(t))
+
+ def test_is_true(self):
+ w = self.space.wrap
+ true = (1==1)
+ false = (1==0)
+ w_true = w(true)
+ w_false = w(false)
+ self.failUnless(self.space.is_true(w_true))
+ self.failIf(self.space.is_true(w_false))
if __name__ == '__main__':
testsupport.main()
More information about the Pypy-commit
mailing list