Revert to running tests from from a temp dir when test-sources is unset (#2420)

* Revert to running tests from from a temp dir when test-sources is unset

* Fix placeholders error message, add test for it

* Add back {project} placeholders to CIBW_TEST_COMMAND in tests & docs

* Update test/test_before_test.py

---------

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
Joe Rickerby
2025-05-28 16:05:16 +01:00
committed by GitHub
co-authored by Henry Schreiner
parent 7298563b25
commit 6379772957
16 changed files with 209 additions and 107 deletions
+2 -2
View File
@@ -62,10 +62,10 @@ def test(tmp_path, build_frontend_env):
"CIBW_TEST_REQUIRES": "pytest",
# the 'false ||' bit is to ensure this command runs in a shell on
# mac/linux.
"CIBW_TEST_COMMAND": f"false || {utils.invoke_pytest()} ./test",
"CIBW_TEST_COMMAND": f"false || {utils.invoke_pytest()} {{project}}/test",
# pytest fails on GraalPy 24.2.0 on Windows so we skip it there
# until https://github.com/oracle/graalpython/issues/490 is fixed
"CIBW_TEST_COMMAND_WINDOWS": "where graalpy || pytest ./test",
"CIBW_TEST_COMMAND_WINDOWS": "where graalpy || pytest {project}/test",
**build_frontend_env,
},
)