2010-05-06 15 views
7

Uso nosetest per eseguire alcuni test. Tuttavia, al termine dell'esecuzione dei test, il processo nosetests rimane solo lì e non verrà chiuso. C'è comunque da diagnosticare questo? Python ha una struttura simile all'invio di Java a kill -QUIT che stamperà una traccia dello stack?Il processo Python non verrà interrotto

risposta

1

È possibile inserire il debugger e digitare bt:

import pdb; pdb.set_trace() 

Quindi è possibile scorrere l'operazione e vedere dove si blocca.

4
nosetests -vv -x -s --pdb test_foo 

dove -x è "Stop esecuzione di test dopo il primo errore o il fallimento" e --pdb è "drop in debugger su guasti o errori"

anche vedere http://nose.readthedocs.org/en/latest/usage.html

+0

Devo anche premere Ctrl + D per alcuni test che eseguono ** subprocess ** chiamate. –

Problemi correlati