chore: stricter mypy (#2053)
* chore: improve mypy Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * chore(types): type functions in tests Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * chore(types): No partial types in tests Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -33,10 +33,9 @@ def test(tmp_path, capfd):
|
||||
basic_project.generate(project_dir)
|
||||
|
||||
num_builds = len(utils.cibuildwheel_get_build_identifiers(project_dir))
|
||||
if num_builds > 1:
|
||||
expectation = pytest.raises(subprocess.CalledProcessError)
|
||||
else:
|
||||
expectation = does_not_raise()
|
||||
expectation = (
|
||||
pytest.raises(subprocess.CalledProcessError) if num_builds > 1 else does_not_raise()
|
||||
)
|
||||
|
||||
with expectation as exc_info:
|
||||
result = utils.cibuildwheel_run(
|
||||
@@ -48,6 +47,7 @@ def test(tmp_path, capfd):
|
||||
|
||||
captured = capfd.readouterr()
|
||||
if num_builds > 1:
|
||||
assert exc_info is not None
|
||||
assert "Build failed because a wheel named" in captured.err
|
||||
assert exc_info.value.returncode == 6
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user