I found a bug in a open source project. The bug is easy to reproduce and as such I have added a failing unit test (the project already uses unit tests) and submitted a pull request.

I have not fixed the problem, I just wrote a unit test illustrating the problem.

The PR cannot be merged because the unit test fails. Did I do the right thing by submitting the unit tests as a PR? Should I have done something different?

  • 1
    @Abigail Honestly, that looks like the basis for a good answer! I didn't know about the practice of separate TODO tests. A brief description of project-management options would be really useful. You (or anyone else who cares to answer) could even approach it from the other side and consider "If you operate a project, should (and how could) you accept deliberately failing unit tests?" as part of the answer. – apsillers Aug 19 '19 at 16:55

Depending on the programming language you are using you can creatge a mergerequest with a disabled/ignored unittest.

This avoid having failing-unit-tests in the code branch which can be easyly reenabled when fixing the issue.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy