testing - Passing custom Python objects to nosetests -
i attempting re-organize our test libraries automation , nose seems promising. question is, best strategy passing python objects nose tests?
our tests organized in testlib bunch of modules exercise different types of request operations. this:
testlib \-testmoda \-testmodb \-testmodc
in cases test modules (i.e. testmoda) nothing test_something(), test_something2() functions while in cases have testmodb class in testmob test_anotherthing1(), test_anotherthing2() functions. cool thing nose finds both.
most of test functions request factory stuff can share single connection our server farm. lot of test_something1(cnn), testmodb.test_anotherthing2(cnn), etc.
currently don't use nose, instead have hodge-podge of homegrown driver scripts hard-coded lists of tests execute. each of driver scripts creates own connection object. maintaining scripts , connection minutia painful.
i'd take free advantage of nose's beautiful discovery functionality, passing in connection object of choosing.
thanks in advance!
rob
p.s. connection objects not pickle-able. :(
could use factory create connections, have functions test_something1()
(taking no arguments) use factory connection?
Comments
Post a Comment