[pypy-commit] cffi default: Another test that version number matches.

arigo noreply at buildbot.pypy.org
Wed Feb 13 12:17:39 CET 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r1156:66926e0d11ca
Date: 2013-02-13 12:16 +0100
http://bitbucket.org/cffi/cffi/changeset/66926e0d11ca/

Log:	Another test that version number matches.

diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -4,7 +4,7 @@
     sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
 _setup_path()
 from _cffi_backend import *
-from _cffi_backend import _testfunc, _get_types
+from _cffi_backend import _testfunc, _get_types, __version__
 
 # ____________________________________________________________
 
@@ -2736,3 +2736,7 @@
     d = newp(BShortArray, [40, 50])
     c[1:3] = d
     assert list(c) == [0, 40, 50, 30, 0]
+
+def test_version():
+    # this test is here mostly for PyPy
+    assert __version__ == "0.6"
diff --git a/testing/test_version.py b/testing/test_version.py
--- a/testing/test_version.py
+++ b/testing/test_version.py
@@ -35,3 +35,10 @@
     #
     v = cffi.__version__
     assert ("version='%s'" % v) in content
+
+def test_c_version():
+    parent = os.path.dirname(os.path.dirname(__file__))
+    v = cffi.__version__
+    p = os.path.join(parent, 'c', 'test_c.py')
+    content = open(p).read()
+    assert ('assert __version__ == "%s"' % v) in content


More information about the pypy-commit mailing list