summaryrefslogtreecommitdiff
path: root/testing/cffi0
diff options
context:
space:
mode:
authorSergey Vorfolomeev <sergey.vorfolomeev@vmssoftware.com>2021-04-09 08:29:05 +0500
committerSergey Vorfolomeev <sergey.vorfolomeev@vmssoftware.com>2021-04-09 08:29:05 +0500
commitc48fc339035511967023aa9783ce8afc1c00a492 (patch)
treea59352e46c3497219973c15158cd1231876099a9 /testing/cffi0
parent836a60368633def79b7fe439be845f5272f4bc9e (diff)
parentf17762f93b1f882554b6fe12c8271f907aebf6ad (diff)
downloadcffi-openvms.tar.gz
merge default to 'openvms'openvms
changed: .hgtags c/_cffi_backend.c c/ffi_obj.c c/test_c.py cffi/__init__.py cffi/_embedding.h cffi/recompiler.py cffi/verifier.py doc/source/conf.py doc/source/installation.rst doc/source/whatsnew.rst setup.py setup_base.py testing/cffi0/test_ffi_backend.py testing/cffi0/test_version.py testing/cffi1/test_re_python.py
Diffstat (limited to 'testing/cffi0')
-rw-r--r--testing/cffi0/test_ffi_backend.py1
-rw-r--r--testing/cffi0/test_version.py7
2 files changed, 7 insertions, 1 deletions
diff --git a/testing/cffi0/test_ffi_backend.py b/testing/cffi0/test_ffi_backend.py
index 3552196..8e29bc4 100644
--- a/testing/cffi0/test_ffi_backend.py
+++ b/testing/cffi0/test_ffi_backend.py
@@ -179,6 +179,7 @@ class TestBitfield:
setters = ['case %d: s.%s = value; break;' % iname
for iname in enumerate(fnames)]
lib = ffi1.verify("""
+ #include <string.h>
struct s1 { %s };
struct sa { char a; struct s1 b; };
#define Gofs_y offsetof(struct s1, y)
diff --git a/testing/cffi0/test_version.py b/testing/cffi0/test_version.py
index 9325685..d380b98 100644
--- a/testing/cffi0/test_version.py
+++ b/testing/cffi0/test_version.py
@@ -36,7 +36,12 @@ def test_doc_version_file():
v = cffi.__version__.replace('+', '')
p = os.path.join(parent, 'doc', 'source', 'installation.rst')
content = open(p).read()
- assert (" package version %s:" % v) in content
+ if " package version %s:" % v not in content:
+ for i in range(5):
+ if " package version %s-%d:" % (v, i) in content:
+ break
+ else:
+ assert 0, "doc/source/installation.rst needs updating"
def test_setup_version():
parent = os.path.dirname(os.path.dirname(cffi.__file__))