Read my book

I wrote books about Webpack and React. Check them out!

Sunday, February 28, 2010

Expecter Gadget - Alternative for the Assert Statement

I just happened to come upon a great little project, Expecter Gadget. It provides a viable alternative for Python's native assert statement. Compared to regular assert it provides two important features: readable errors and a way to test for exceptions. Here are a couple of examples to show how handy it is in practice:



I will definitely play around with it in the future. Hopefully you will find it useful too. :)