File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 1+ import subprocess
12import textwrap
23
4+ import pytest
5+
36from . import test_projects , utils
47
58limited_api_project = test_projects .new_c_project (
@@ -25,7 +28,7 @@ def test_setup_cfg(tmp_path):
2528 assert set (actual_wheels ) == set (expected_wheels )
2629
2730
28- def test_build_option_env (tmp_path ):
31+ def test_build_option_env (tmp_path , capfd ):
2932 project_dir = tmp_path / 'project'
3033 test_projects .new_c_project ().generate (project_dir )
3134
@@ -39,3 +42,17 @@ def test_build_option_env(tmp_path):
3942 expected_wheels = [w for w in utils .expected_wheels ('spam' , '0.1.0' , limited_api = 'cp36' )
4043 if '-pp' not in w ]
4144 assert set (actual_wheels ) == set (expected_wheels )
45+
46+
47+ def test_duplicate_wheel_error (tmp_path , capfd ):
48+ project_dir = tmp_path / 'project'
49+ limited_api_project .generate (project_dir )
50+
51+ with pytest .raises (subprocess .CalledProcessError ):
52+ utils .cibuildwheel_run (project_dir , add_env = {
53+ 'CIBW_BUILD' : 'cp36-* cp37-*' ,
54+ })
55+
56+ captured = capfd .readouterr ()
57+ assert "already exists in output directory" in captured .err
58+ assert "It looks like you are building wheels against Python's limited API" in captured .err
You can’t perform that action at this time.
0 commit comments