Python Nose unit testing using separate (sequential) Python processes -
we use python nose unit testing our gui app components , application logic. nose runs tests in 1 process, not big problem application logic complex c++/python lib pyqt, problem since there "application wide" state qt creates, , hard ensure cleanup occurs @ right time such every test method has "clean qt slate".
so prefer have nose start separate python process each test method/function (or @ least flagged needed this). realize slow down test suite benefit should outweigh cost. have seen insulate , multiprocess plugins neither (insulate starts separate proc if crash occurs -- multiprocess tries use n process n cores).
any suggestions?
you can try nosetests --processes=1 --process-restartworker
Comments
Post a Comment