Closed encukou closed 7 years ago
Shouldn't we make the exception common in both cases for easier readability?
Ideally yes, but the CalledProcessError
constructor is currently undocumented, so (technically) only subprocess
code is allowed to raise it.
And I don't think switching to AssertionError
would help readability.
I mean't creating our own CommandFailed
.
Not sure if that helps readability. Feel free to leave the second commit out.
Well the machinery is less readable, but the tests are more readable. So I'd rather keep it.
Expected failures are used for tests that should ideally not fail, but currently do. There should be an open bug for each xfail. For cases where the code should raise an exception, there's
pytest.raises
.Sorry I missed this in the review.