Closed rgaudin closed 4 years ago
This seems a bit too complex. Especially, you are testing that not implementing a method correctly raise an exception by implementing the method and calling the "super" implementation.
Pytest has a fixture to monkeypath a object (and remove a method/attribute) https://docs.pytest.org/en/stable/monkeypatch.html It is probably better to use it to remove method from a correctly implemented article.
And is is better to move the method to remove to a parametrized fixture (https://docs.pytest.org/en/stable/fixture.html#parametrizing-fixtures) instead of having a loop in the test.
You're right it's clearer. @mgautierfr can you take another look?
Codecov Report
100.00% <0.00%> (+9.57%)
Continue to review full report at Codecov.