Skip to content

Commit 61fe449

Browse files
ngoldbaummattip
authored andcommitted
Make test follow idioms in the file
1 parent 9929956 commit 61fe449

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎testing/cffi1/test_cffi_gen_src.py‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,11 @@ def test_import_is_inert():
213213
assert proc.stderr == ""
214214

215215

216-
def test_output_independent_of_generating_interpreter(tmp_path):
217-
# runs on free-threaded and GIL-enabled CI alike; the output must be
218-
# the same on both, with the limited-API decision left to
219-
# _cffi_include.h at compile time
216+
def test_output_independent_of_generating_interpreter(tmp_path, run_cffi_gen_src):
217+
# The output shouldn't disable the limited API explicitly for 3.14 free-threaded builds
220218
pyfile = tmp_path / "_squared_build.py"
221219
pyfile.write_text(SIMPLE_SCRIPT)
222220
out = tmp_path / "squared.c"
223-
proc = _run([sys.executable, "-m", "cffi.gen_src"],
224-
"exec-python", str(pyfile), str(out))
221+
proc = run_cffi_gen_src("exec-python", str(pyfile), str(out))
225222
assert proc.returncode == 0, proc.stderr
226223
assert "#define _CFFI_NO_LIMITED_API" not in out.read_text().splitlines()

0 commit comments

Comments
 (0)