[pypy-commit] pypy default: test/fix cpyext version number
bdkearns
noreply at buildbot.pypy.org
Sat May 3 03:59:35 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r71220:12b3395cfa84
Date: 2014-05-02 21:59 -0400
http://bitbucket.org/pypy/pypy/changeset/12b3395cfa84/
Log: test/fix cpyext version number
diff --git a/pypy/module/cpyext/include/patchlevel.h b/pypy/module/cpyext/include/patchlevel.h
--- a/pypy/module/cpyext/include/patchlevel.h
+++ b/pypy/module/cpyext/include/patchlevel.h
@@ -21,7 +21,7 @@
/* Version parsed out into numeric values */
#define PY_MAJOR_VERSION 2
#define PY_MINOR_VERSION 7
-#define PY_MICRO_VERSION 3
+#define PY_MICRO_VERSION 6
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
#define PY_RELEASE_SERIAL 0
diff --git a/pypy/module/cpyext/test/test_version.py b/pypy/module/cpyext/test/test_version.py
--- a/pypy/module/cpyext/test/test_version.py
+++ b/pypy/module/cpyext/test/test_version.py
@@ -9,11 +9,17 @@
if (Py_IsInitialized()) {
PyObject *m = Py_InitModule("foo", NULL);
PyModule_AddStringConstant(m, "py_version", PY_VERSION);
+ PyModule_AddIntConstant(m, "py_major_version", PY_MAJOR_VERSION);
+ PyModule_AddIntConstant(m, "py_minor_version", PY_MINOR_VERSION);
+ PyModule_AddIntConstant(m, "py_micro_version", PY_MICRO_VERSION);
PyModule_AddStringConstant(m, "pypy_version", PYPY_VERSION);
}
"""
module = self.import_module(name='foo', init=init)
assert module.py_version == sys.version[:5]
+ assert module.py_major_version == sys.version_info.major
+ assert module.py_minor_version == sys.version_info.minor
+ assert module.py_micro_version == sys.version_info.micro
v = sys.pypy_version_info
s = '%d.%d.%d' % (v[0], v[1], v[2])
if v.releaselevel != 'final':
More information about the pypy-commit
mailing list