Relative Content

Tag Archive for assertions

Python – assert vs if & return

I am writing a script that does something to a text file (what it does is irrelevant for my question though). So before I do something to the file I want to check if the file exists. I can do this, no problem, but the issue is more that of aesthetics.

Assert Message in Unit Tests

I’ve just begun reading “The Art Of Unit Testing” by Roy Osherove, and while I’m mostly finding the material very helpful, he makes a statement about not using messages in your Assert statements.

Assert Message in Unit Tests

I’ve just begun reading “The Art Of Unit Testing” by Roy Osherove, and while I’m mostly finding the material very helpful, he makes a statement about not using messages in your Assert statements.

Assert Message in Unit Tests

I’ve just begun reading “The Art Of Unit Testing” by Roy Osherove, and while I’m mostly finding the material very helpful, he makes a statement about not using messages in your Assert statements.