[pypy-commit] pypy default: Add a test that fails here if we forget to update lib_pypy/cffi.egg-info

arigo noreply at buildbot.pypy.org
Sun Mar 8 19:47:49 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r76283:2849115f3479
Date: 2015-03-08 19:47 +0100
http://bitbucket.org/pypy/pypy/changeset/2849115f3479/

Log:	Add a test that fails here if we forget to update lib_pypy/cffi.egg-
	info

diff --git a/pypy/module/_cffi_backend/__init__.py b/pypy/module/_cffi_backend/__init__.py
--- a/pypy/module/_cffi_backend/__init__.py
+++ b/pypy/module/_cffi_backend/__init__.py
@@ -2,13 +2,15 @@
 from pypy.interpreter.mixedmodule import MixedModule
 from rpython.rlib import rdynload
 
+VERSION = "0.9.1"
+
 
 class Module(MixedModule):
 
     appleveldefs = {
         }
     interpleveldefs = {
-        '__version__': 'space.wrap("0.9.1")',
+        '__version__': 'space.wrap("%s")' % VERSION,
 
         'load_library': 'libraryobj.load_library',
 
diff --git a/pypy/module/_cffi_backend/test/test_file.py b/pypy/module/_cffi_backend/test/test_file.py
--- a/pypy/module/_cffi_backend/test/test_file.py
+++ b/pypy/module/_cffi_backend/test/test_file.py
@@ -15,3 +15,10 @@
             "Update test/_backend_test_c.py by copying it from "
             "https://bitbucket.org/cffi/cffi/raw/default/c/test_c.py "
             "and killing the import lines at the start")
+
+def test_egginfo_version():
+    from pypy.module._cffi_backend import VERSION
+    line = "Version: %s\n" % VERSION
+    eggfile = py.path.local(__file__).join('..', '..', '..', '..', '..',
+                                           'lib_pypy', 'cffi.egg-info')
+    assert line in eggfile.readlines()


More information about the pypy-commit mailing list