Skip to main content

All Questions

14 votes
3 answers
3k views

Should I choose repeated code in unit test or test logic? Can I avoid both?

When writing unit tests, I feel that there is a trade-off between code repetition and test logic. Example of my current (likely flawed) approach: To test this function (overly simple function for ...
Jasper Braun's user avatar
1 vote
3 answers
624 views

Is using pytruth considered Pythonic?

I recently found Googles pytruth package. I am very used to pytest and I am wondering what the value of the way less commonly used pytruth is. The only reason why I didn't directly discard it, is that ...
Martin Thoma's user avatar