Make test_parsing more resilient to changes in pycparser#224
Make test_parsing more resilient to changes in pycparser#224mattip merged 2 commits intopython-cffi:mainfrom
Conversation
Several tests expect precise error messages from pycparser, which pycparser doesn't guarantee. While testing CFFI with pycparser 3.0, some tests needed to be made more resilient. I've used the .startswith() approach already used in this file, instead of exact string matching. Ref python-cffi#223
|
The only failing CI check (https://github.com/python-cffi/cffi/actions/runs/21318284561/job/61364325190?pr=224) seems to be pulling pycparser 2.23 instead of the new 3.00; I'm not sure why, this is probably specific to how this check is set up? It would be possible to make the failing test even more resilient - succeeding on both pycparser 2.23 and 3.00; I can amend the PR to do that, if you're interested. Alternatively, the check can be fixed to pull the newest pycparser - like all the other CI checks. |
|
If possible loosening the error checking specificity to accommodate both versions would be great |
Thank you for the quick review. Done - all CI checks pass now. |
|
Thanks @eliben |
Several tests expect precise error messages from pycparser, which pycparser doesn't guarantee. While testing CFFI with pycparser 3.0, some tests needed to be made more resilient. I've used the .startswith() approach already used in this file, instead of exact string matching.
Ref #223