Commits

Armin Rigo committed 66926e0

Another test that version number matches.

Comments (0)

Files changed (2)

     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__
 
 # ____________________________________________________________
 
     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"

testing/test_version.py

     #
     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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.