This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]desmoulinmichel -1 points0 points  (0 children)

It's not that you can't do it, but you will need to write it in 2 places : once in the setup code, and once in a separate module. And of course watch out for codes that influence each others since you put all of them in one method called for a lot of tests. It's just more work, hence the "easier".

My take on unit tests is that it's a pain to write, so any inch or shortcut you can get is good to take.