Add test for argument passthrough
This commit is contained in:
@@ -175,3 +175,44 @@ def test_internal_config_file_argument(tmp_path, capfd):
|
||||
# check that before-all was run
|
||||
captured = capfd.readouterr()
|
||||
assert "test log statement from before-all 1829" in captured.out
|
||||
|
||||
|
||||
def test_argument_passthrough(tmp_path, capfd):
|
||||
basic_project = test_projects.new_c_project()
|
||||
|
||||
# make an sdist of a project
|
||||
sdist_dir = tmp_path / "sdist"
|
||||
sdist_dir.mkdir()
|
||||
sdist_path = make_sdist(basic_project, sdist_dir)
|
||||
|
||||
# make a call that should pass some args through to cibuildwheel
|
||||
# this asks cibuildwheel to print the ppc64le build identifiers
|
||||
process = subprocess.run(
|
||||
[
|
||||
sys.executable,
|
||||
"-m",
|
||||
"cibuildwheel.from_sdist",
|
||||
sdist_path,
|
||||
"--platform",
|
||||
"linux",
|
||||
"--archs",
|
||||
"ppc64le",
|
||||
"--print-build-identifiers",
|
||||
],
|
||||
env={
|
||||
**os.environ,
|
||||
"CIBW_BUILD": "cp38-*",
|
||||
},
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
universal_newlines=True,
|
||||
)
|
||||
|
||||
# fmt: off
|
||||
assert process.stdout == textwrap.dedent(
|
||||
"""
|
||||
cp38-manylinux_ppc64le
|
||||
cp38-musllinux_ppc64le
|
||||
"""
|
||||
).lstrip()
|
||||
# fmt: on
|
||||
|
||||
Reference in New Issue
Block a user