Commits

Armin Rigo committed 7e4f0fa

Fix test_version: give PYPY_VERSION a format following the standard,
and fix the test to correctly expect the "-beta1".

  • Participants
  • Parent commits f2627b0
  • Branches release-2.0-beta1

Comments (0)

Files changed (2)

File pypy/module/cpyext/include/patchlevel.h

 #define PY_VERSION		"2.7.3"
 
 /* PyPy version as a string */
-#define PYPY_VERSION "2.0beta1"
+#define PYPY_VERSION "2.0.0-beta1"
 
 /* Subversion Revision number of this file (not of the repository).
  * Empty since Mercurial migration. */

File pypy/module/cpyext/test/test_version.py

         """
         module = self.import_module(name='foo', init=init)
         assert module.py_version == sys.version[:5]
-        assert module.pypy_version == '%d.%d.%d' % sys.pypy_version_info[:3]
+        v = sys.pypy_version_info
+        s = '%d.%d.%d' % (v[0], v[1], v[2])
+        if v.releaselevel != 'final':
+            s += '-%s%d' % (v[3], v[4])
+        assert module.pypy_version == s