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

jacob at codespeak.net jacob at codespeak.net
Tue Dec 16 11:32:28 CET 2003


Author: jacob
Date: Tue Dec 16 11:32:28 2003
New Revision: 2352

Modified:
   pypy/trunk/src/pypy/objspace/std/test/test_boolobject.py
   pypy/trunk/src/pypy/objspace/std/test/test_intobject.py
Log:
Added tests for str and repr.

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:32:28 2003
@@ -35,6 +35,8 @@
     def test_bool_string(self):
         self.assertEquals("True", str(True))
         self.assertEquals("False", str(False))
+        self.assertEquals("True", repr(True))
+        self.assertEquals("False", repr(False))
 
 if __name__ == '__main__':
     test.main()

Modified: pypy/trunk/src/pypy/objspace/std/test/test_intobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/test/test_intobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/test/test_intobject.py	Tue Dec 16 11:32:28 2003
@@ -298,6 +298,10 @@
 
     def test_int_float(self):
         self.assertEquals(4, int(4.2))
+
+    def test_int_str_repr(self):
+        self.assertEquals("42", str(42))
+        self.assertEquals("42", repr(42))
         
 
 if __name__ == '__main__':


More information about the Pypy-commit mailing list