Morning,
I've re-written the Biskit unittest system. Rather than biskit/test/test.py, you
should now use biskit/Biskit/test.py. The new features are:
(1) automatic test collection
The biggest change is that the new test module *automatically* collects all
BiskitTest-derrived test cases from a given python package (read: folder). This
means that I had to change the Test classes in all modules to become BiskitTest
childs. The job is almost done, some modules in Biskit/Mod still need to be
adapted though.
(2) test tagging
BiskitTests have a TAGS field to classify them into zero, one or more categories
like OLD, EXE, PVM, and LONG. Categories can be excluded from a test run with
option -e or exclusively included with option -i.
(3) always remove test data
A cleanUp() hook function should be used to remove test-generated files (test.py
is put into debugging mode with -d ) I suggest we from now on report any
left-over test files as bug.
(4) test plots are optional
BiskitTests should now only generate plots or extra-windows if self.VERBOSITY is
set to > 2 (I mean 3 :-) ). Verbosity is controlled with the -v flag to test.py.
(5) namespace publishing for debugging
I went to quite some namespace magic to make local debugging of an individual
module easier. Biskit.test.localTest() collects all test cases from the module
from which it is called and publishes all fields of this test instance back to
the outer-most global namespace. That means all the fields assigned to 'self' in
the test class are later available in the global namespace (self itself too) --
even if the test aborts with an exception. The disadvantage is an inflation of
'self.*' that makes the test code a bit less readable. So the old
globals().update(locals()) still has its virtues. With even more stack-frame
magic it should actually also be possible to pull non-self locals into the
global namespace...
(6) automatic local
BiskitTest automatically knows whether it is executed locally (self.local=True)
or not.
(7) other stuff
* Xplorer doesn't ask for password any longer if run locally (ssh is only used
for remote nodes) -- funny enough attempting the same on Docker broke it,
apparently it only runs wrapped into ssh... strange.
* I managed to create a ContactSlave test case that kind of simulates the master
and runs locally without pvm -- well almost. pvm is still needed because the
master needs it to initialize but the test does not actually use it.
* automatic collection means we now also have an automatic report which modules
do **not** yet have a test case. The -dry option is good to get only this one
without actually running the tests.
* I switched SequenceSearcher to the more stable XML parsers and fixed up some
more bugs -- localBlast/PsiBlast and remoteBlast should be up and running again,
at least with the latest ncbitools program
That's it :-)
Should hopefully make our life easier in the future...
Greetings,
Raik
--
________________________________
Dr. Raik Gruenberg
http://www.raiks.de/contact.html
________________________________
|