[pypy-svn] r61244 - pypy/trunk/lib-python/modified-2.5.2/test

arigo at codespeak.net arigo at codespeak.net
Thu Jan 22 16:08:59 CET 2009


Author: arigo
Date: Thu Jan 22 16:08:59 2009
New Revision: 61244

Modified:
   pypy/trunk/lib-python/modified-2.5.2/test/test_sys.py
Log:
More PyPy-ification.


Modified: pypy/trunk/lib-python/modified-2.5.2/test/test_sys.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/test/test_sys.py	(original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_sys.py	Thu Jan 22 16:08:59 2009
@@ -327,14 +327,17 @@
         self.assert_(sys.byteorder in ("little", "big"))
         self.assert_(isinstance(sys.builtin_module_names, tuple))
         self.assert_(isinstance(sys.copyright, basestring))
-        self.assert_(isinstance(sys.exec_prefix, basestring))
         self.assert_(isinstance(sys.executable, basestring))
         self.assert_(isinstance(sys.hexversion, int))
         self.assert_(isinstance(sys.maxint, int))
         if test.test_support.have_unicode:
             self.assert_(isinstance(sys.maxunicode, int))
         self.assert_(isinstance(sys.platform, basestring))
-        self.assert_(isinstance(sys.prefix, basestring))
+        if hasattr(sys, 'prefix'):
+            self.assert_(isinstance(sys.prefix, basestring))
+            self.assert_(isinstance(sys.exec_prefix, basestring))
+        else:
+            self.assert_(isinstance(sys.pypy_prefix, basestring))  # PyPy only
         self.assert_(isinstance(sys.version, basestring))
         vi = sys.version_info
         self.assert_(isinstance(vi, tuple))



More information about the Pypy-commit mailing list