This commit is contained in:
Florian Bruhin 2023-06-24 20:14:53 +02:00
parent b5d5c7f4d3
commit 342cd9585a
2 changed files with 2 additions and 3 deletions

View File

@ -178,8 +178,7 @@ def _select_wrapper(args: Optional[argparse.Namespace]) -> SelectionInfo:
return SelectionInfo(wrapper=env_wrapper, reason=SelectionReason.env)
if _WRAPPER_OVERRIDE is not None:
pass # type: ignore[unreachable]
assert _WRAPPER_OVERRIDE in WRAPPERS, _WRAPPER_OVERRIDE
assert _WRAPPER_OVERRIDE in WRAPPERS # type: ignore[unreachable]
return SelectionInfo(wrapper=_WRAPPER_OVERRIDE, reason=SelectionReason.override)
return _autoselect_wrapper()

View File

@ -380,7 +380,7 @@ class TestSelectWrapper:
def test_invalid_override(self, monkeypatch: pytest.MonkeyPatch):
monkeypatch.setattr(machinery, "_WRAPPER_OVERRIDE", "invalid")
with pytest.raises(AssertionError, match="invalid"):
with pytest.raises(AssertionError):
machinery._select_wrapper(args=None)