chore: rework single python tests (#1835)

* chore: rework single python tests

* chore(tests): limit number of builds in test_abi3

* chore(tests): limit number of builds in test_before_all

* apply review suggestion

use `os.path.samefile` rather than comparing `os.stat` directly.
This commit is contained in:
Matthieu Darbois
2024-05-26 12:41:20 +02:00
committed by GitHub
parent 67ee9dda92
commit 97da90432e
16 changed files with 143 additions and 136 deletions
+2 -3
View File
@@ -45,13 +45,12 @@ def test(capfd, tmp_path):
add_env={
"CIBW_BEFORE_BUILD": "python {project}/bin/before_build.py",
"CIBW_TEST_COMMAND": "python {package}/test/run_tests.py",
# this shouldn't depend on the version of python, so build only CPython 3.10
"CIBW_BUILD": "cp310-*",
},
single_python=True,
)
# check that the expected wheels are produced
expected_wheels = [w for w in utils.expected_wheels("spam", "0.1.0") if "cp310" in w]
expected_wheels = utils.expected_wheels("spam", "0.1.0", single_python=True)
assert set(actual_wheels) == set(expected_wheels)
captured = capfd.readouterr()