[cctbxbb] Native python unittests for the libtbx testing framework

Luc Bourhis luc_j_bourhis at mac.com
Tue May 19 16:47:20 PDT 2015


Hi Markus,

> The python unittest framework has a couple of advantages over the libtbx testing world. I found that the two most immediate advantages are:

my 2p: 

First create a parallel testing bed which you trigger from the existing testing framework. That way, you don’t disturb anybody.

Then, please, use pick py.test instead. It is a far superior test framework, which can make intelligent use of plain asserts by magically providing some nice printouts when they fail. The amount of boiler plate required by unittest is too high imho. And then, I am pretty sure you could write a test runner which could find all the existing tests, if we eventually decide to move in that direction.

Which brings me to Pavel’s comments. I am definitively on his side. Yes, the cctbx does reinvent the wheel for its test system and in an ideal world we would be using more standard tools (I mean we reinvented the wheel for the build system too as we don’t use SCons as it is intended to). But the train has left the platform a long time ago: there is no way we will ever convert the existing tests to unittest classes. Hence my proposition to use py.test as this could make the transition painless.

Best wishes,

Luc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20150520/d6959423/attachment.htm>


More information about the cctbxbb mailing list