1 parent f38d28a commit 4db93caCopy full SHA for 4db93ca
1 file changed
testing/cffi0/test_version.py
@@ -59,4 +59,8 @@ def test_embedding_h():
59
v = cffi.__version__
60
p = cffi_root / 'src/cffi/_embedding.h'
61
content = _read(p)
62
- assert ('cffi version: %s"' % (v,)) in content
+ loc = content.find('cffi version: ')
63
+ assert loc > 0, "Cannot find cffi version string in _embedding.h"
64
+ context = content[loc-100:loc+100]
65
+ msg = f"CFFI verison is incorrect, context for current version string is:\n{context}"
66
+ assert (f'cffi version: {v}"') in context, msg
0 commit comments