Skip to content

Commit

Permalink
switch function name in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Oct 29, 2024
1 parent 269b7e6 commit 84637a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions testing/cffi0/test_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 <math.h>', 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 <math.h>', 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)

0 comments on commit 84637a9

Please sign in to comment.