[pypy-svn] rev 2348 - pypy/trunk/src/pypy/objspace/std/test

alex at codespeak.net alex at codespeak.net
Tue Dec 16 11:04:42 CET 2003


Author: alex
Date: Tue Dec 16 11:04:41 2003
New Revision: 2348

Modified:
   pypy/trunk/src/pypy/objspace/std/test/test_boolobject.py
Log:
Added application-level test case


Modified: pypy/trunk/src/pypy/objspace/std/test/test_boolobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/test/test_boolobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/test/test_boolobject.py	Tue Dec 16 11:04:41 2003
@@ -23,6 +23,18 @@
     def test_false(self):
         self.failIf_w(self.false)
         
+class AppBoolTest(test.AppTestCase):
+    def setUp(self):
+        self.space = test.objspace('std')
+
+    def test_bool_callable(self):
+        self.assertEquals(True, bool(1))
+        self.assertEquals(False, bool(0))
+        self.assertEquals(False, bool())
+
+    def test_bool_string(self):
+        self.assertEquals("True", str(True))
+        self.assertEquals("False", str(False))
 
 if __name__ == '__main__':
     test.main()


More information about the Pypy-commit mailing list