On 3/17/07, Chris MacRaild <c.a.macraild@xxxxxxxxxxx> wrote:
On Fri, 2007-03-16 at 18:07 +1100, Edward d'Auvergne wrote:
> Chris,
>
> I've cleaned up the unit tests so that you should be able to check
> that these changes are working properly. Would you be able to fix the
> relax module import statements for the alternative relax data storage
> object? This commit has put relax into a very bad shape (not that
> much was functioning anyway, but now nothing is). I'm also not sure
> why but the data storage singleton instance method 'add()' (to add a
> new data pipe) is not working as it should.
It seems my attempt to delegate unbound methods from the Data class to a
proxy object was pushing Pythons polymorphism a step too far, hence the
test failures (ie. the problem was in the test, not in the code). My
solution to that (in r3209) is rather cheeky, but acceptable I hope in
the context of a unit-test?
I realised after my message that the unit test was at fault. I had
only just gotten these tests to run and they had not been fully
debugged. The method of creating a second singleton for testing isn't
too bad. It does break the design pattern but it allows us to really
hack the object to pieces in these unit tests without having to worry
about breaking all the other unit tests which use the storage object
(which will be the majority of the tests).
All the imports are now fixed, and relax at least gets to a prompt.
There is even one working system test! Would you like me to do anything
more to get closer to a functional system at this stage, or can further
changes continue with the progressive redesign?
Thanks again for the fixes. I'll continue with the redesign but if
you wish to implement parts of it - for instance the 'runs' argument
and looping code, converting the user functions to functors (class
instances), etc. - feel free. I'm still working on the preparatory
stages implementing the user functions for manipulating the relax data
storage object. Once the points of the preparation section are
complete, then the rest of the relax code base can be converted
function by function to the new system. I should create two lists of
user functions - those which work and those that don't.
Cheers,
Edward