From 84637a968177aea3045fd7094f62d43740a733e6 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 29 Oct 2024 09:45:27 +0200 Subject: [PATCH] switch function name in test --- testing/cffi0/test_verify.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/cffi0/test_verify.py b/testing/cffi0/test_verify.py index 6a552314..f0c9de8b 100644 --- a/testing/cffi0/test_verify.py +++ b/testing/cffi0/test_verify.py @@ -2248,10 +2248,10 @@ def test_implicit_unicode_on_windows(): def test_use_local_dir(): ffi = FFI() - lib = ffi.verify("", modulename="test_use_local_dir") + lib = ffi.verify("", modulename="_cffi_test_use_local_dir") this_dir = os.path.dirname(__file__) pycache_files = os.listdir(os.path.join(this_dir, '__pycache__')) - assert any('test_use_local_dir' in s for s in pycache_files) + assert any('_cffi_test_use_local_dir' in s for s in pycache_files) def test_define_known_value(): ffi = FFI() @@ -2593,14 +2593,14 @@ def test_no_regen(): import os ffi = FFI() modulename = "_cffi_test_no_regen" - ffi.cdef("double sin(double x);") + ffi.cdef("double cos(double x);") lib = ffi.verify('#include ', libraries=lib_m, modulename=modulename) - assert lib.sin(1.23) == math.sin(1.23) + assert lib.cos(1.23) == math.cos(1.23) # Make sure that recompiling the same code does not rebuild the C file cfile = os.path.join(ffi.verifier.tmpdir, f"{modulename}.c") assert os.path.exists(cfile) os.unlink(cfile) assert not os.path.exists(cfile) lib = ffi.verify('#include ', libraries=lib_m, modulename=modulename) - assert lib.sin(1.23) == math.sin(1.23) + assert lib.cos(1.23) == math.cos(1.23) assert not os.path.exists(cfile)