diff options
author | Armin Rigo <arigo@tunes.org> | 2020-07-27 17:58:04 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2020-07-27 17:58:04 +0200 |
commit | 23a2cf4031c1fa3b0652fe4c87b05283b813d815 (patch) | |
tree | 9fa68fdf6aad0e1b7e5f6b224e1a692ea2904927 | |
parent | 75b945d304ec9013e1885c565c2c7bf2a9400f88 (diff) | |
download | cffi-23a2cf4031c1fa3b0652fe4c87b05283b813d815.tar.gz |
CPython 3.9b5 fix
-rw-r--r-- | testing/cffi0/test_verify.py | 5 | ||||
-rw-r--r-- | testing/support.py | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/testing/cffi0/test_verify.py b/testing/cffi0/test_verify.py index 3a1c0b9..65833b8 100644 --- a/testing/cffi0/test_verify.py +++ b/testing/cffi0/test_verify.py @@ -97,6 +97,11 @@ def _Wconversion(cdef, source, **kargs): return lib def test_Wconversion_unsigned(): + if '-Wno-sign-conversion' in extra_compile_args: + # CPython 3.9 needs -Wno-sign-conversion, so we can't meaningfully + # run this test + py.test.skip("cannot test this on CPython >= 3.9") + # _Wconversion("unsigned foo(void);", "int foo(void) { return -1;}") diff --git a/testing/support.py b/testing/support.py index de8131c..282224d 100644 --- a/testing/support.py +++ b/testing/support.py @@ -112,3 +112,7 @@ else: extra_compile_args = ['-Werror', '-Wall', '-Wextra', '-Wconversion', '-Wno-unused-parameter', '-Wno-unreachable-code'] + # CPython 3.9 added in its headers something that triggers this warning, + # so we need to disable it + if sys.version_info >= (3, 9): + extra_compile_args.append('-Wno-sign-conversion') |