por Carlos Ble | Mar 18, 2009 | DDD
We’ve developed this to be able to run trusted methods as batch operations that were saved into database to be performed later on. The code is easy to understand reading its tests: Tests: Check out this file Code: import os import inspect import inspect class...
por Carlos Ble | Mar 17, 2009 | Test Driven Development
This is about Python Mocker features. In order to pass in a mock as a parameter to the SUT (subject under test) you might think of creating the mock using either, “mock()” method or “proxy(SomeClass)” method. They both yield mocks but they work...
por Carlos Ble | Mar 17, 2009 | Test Driven Development
Se acaba de crear una nueva lista sobre Test Driven Development en castellano: http://groups.google.com/group/tddev-sp Muchas gracias a Jose Ramón Diaz por la iniciativa. Esperemos que los recursos en castellano sigan aumentando.
por Carlos Ble | Mar 16, 2009 | Free/Libre Software
Leyendo la lista de ALT.Net hoy me he llevado una grata sorpresa. Hay una empresa de Madrid que ha liberado un framework open source para .Net. Se llama Signum Framework. La verdad que no lo he podido mirar pero la web está chula. Independientemente de que sea malo o...
por Carlos Ble | Mar 13, 2009 | Test Driven Development
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...
por Carlos Ble | Mar 10, 2009 | DDD
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...
por Carlos Ble | Mar 10, 2009 | DDD
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 }...
por Carlos Ble | Feb 6, 2009 | Test Driven Development
I’ve realized that test code difficult to write and read is sometimes a code smell. It could mean the test code is wrong or the SUT (subject under test) itself is wrong. I’ve got myself thinking of how to test a method X of a class C which is calling...
por Carlos Ble | Jan 30, 2009 | DDD
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...
por Carlos Ble | Jan 20, 2009 | Test Driven Development
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...