File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,37 @@ def test(tmp_path, capfd):
3939 pytest .raises (subprocess .CalledProcessError ) if num_builds > 1 else does_not_raise ()
4040 )
4141
42+ with expectation as exc_info :
43+ result = utils .cibuildwheel_run (
44+ project_dir ,
45+ add_env = {
46+ "CIBW_REPAIR_WHEEL_COMMAND" : "python repair.py {wheel} {dest_dir}" ,
47+ },
48+ )
49+
50+ captured = capfd .readouterr ()
51+ if num_builds > 1 :
52+ assert exc_info is not None
53+ assert "Build failed because a wheel named" in captured .err
54+ assert exc_info .value .returncode == 6
55+ else :
56+ # We only produced one wheel (perhaps Pyodide)
57+ # check that it has the right name
58+ assert result [0 ].startswith ("spam-0.1.0-py2-none-" )
59+
60+
61+ def test_project_placeholder (tmp_path , capfd ):
62+ # Identical to the previous test with the additional assumption that the {project}
63+ # placeholder has been replaced correctly
64+
65+ project_dir = tmp_path / "project"
66+ basic_project .generate (project_dir )
67+
68+ num_builds = len (utils .cibuildwheel_get_build_identifiers (project_dir ))
69+ expectation = (
70+ pytest .raises (subprocess .CalledProcessError ) if num_builds > 1 else does_not_raise ()
71+ )
72+
4273 with expectation as exc_info :
4374 result = utils .cibuildwheel_run (
4475 project_dir ,
You can’t perform that action at this time.
0 commit comments