diff options
| author | Armin Rigo <arigo@tunes.org> | 2012-06-29 12:41:59 +0200 |
|---|---|---|
| committer | Armin Rigo <arigo@tunes.org> | 2012-06-29 12:41:59 +0200 |
| commit | f45a4c0e5bdf0004aadcef96bb330d5ffe90b036 (patch) | |
| tree | 5c54993d06ac52dfcfacac952301bf8df6fd4fc8 /testing/test_version.py | |
| parent | e37dfeefc3f97e672d9e4b1e25decd0d162dd638 (diff) | |
| download | cffi-f45a4c0e5bdf0004aadcef96bb330d5ffe90b036.tar.gz | |
Add a test that the version is consistent.
Diffstat (limited to 'testing/test_version.py')
| -rw-r--r-- | testing/test_version.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/test_version.py b/testing/test_version.py new file mode 100644 index 0000000..c47d1d5 --- /dev/null +++ b/testing/test_version.py @@ -0,0 +1,16 @@ +import os +import cffi, _cffi_backend + +def test_version(): + v = cffi.__version__ + assert v == '%s.%s' % cffi.__version_info__ + assert v == _cffi_backend.__version__ + +def test_doc_version(): + parent = os.path.dirname(os.path.dirname(__file__)) + p = os.path.join(parent, 'doc', 'source', 'conf.py') + content = file(p).read() + # + v = cffi.__version__ + assert ("version = '%s'\n" % v) in content + assert ("release = '%s'\n" % v) in content |
