Run just a group of tests

Sometimes we (my team in our current project) have a single TestCase (class) holding tests for several SUTs (classes). That is not right as every class should have its own TestCase (It has to do with the fact that instantiating the tests to run them is a pain with...

Optional arguments are evil

When it comes to version and API changes, Python optional arguments are evil. Say you define a function like this: def someFunction(param1, param2, optParam=None) # code And you are calling it from module whatever.py like this: retValue = someFunction(x, y, z) A few...

Catch the exception and throw it again

Same behavior in Python and C#… Wrong code: try: # some code except Exception, e: # log the exception or whatever raise e Right code: try: # some code except Exception, e: # log the exception or whatever raise # JUST RAISE!!! Wrong code: try { // whatever }...

Continuous Integration on Python

Hudson and Cruise Control are very popular among Java/.Net developers but when it comes to Python, … Hudson also seems to work on python!. Open source tools for Python continuous integration: Hudson Buildbot Bitten However, I just want a simple way to check out...

TDD Efficacy and enemies

Part of this information has been got from the testdrivendevelopment group. The main enemy of TDD is…. the lazy developer. I’d rather say, the lazy programmer. It’s good to read that it is just not only me who thinks that laziness is the most...