Context:
I'm using the attrib nose plugin to classify my testcases. I defined standard attributes (i.e. Speed) and a limited value set for this attribute (i.e. 'fast', 'normal', 'slow'). The problem with this kind of attributes is, that they are vulnerable to typos or to very creative developers, that create new fancy attributes or values :-)
So I want to write a test to discover this kind of deviations from my standard definition.
The idea is, to run nose from the test itself with the --collect-only
option and an attribute filter -A "Speed !='fast' and Speed!='normal' and Speed!='slow'"
.
So if everything would be ok, nose would run 0 tests and this would be asserted in my test.
Problems/Questions
How can I easily get the numeric test results (ran tests, failed tests, passed tests, ...) from nose without parsing stdout for example? Will I have to write my own plugin to access these values directly?