Задать вопрос

Тел: +7 965 3737 888

425

Просмотров

0

Ответов

Forcing unit test runner to abort after failed test

<p>Sometimes running a test suite can take a long time. This can get especially annoying when you see a failure or error, but have to wait for all the remaining tests to run before you can see the relevant stack traces.</p>
<p>Pressing ctrl+c to interrupt the tests does not work; the KeyboardInterrupt exception does not get caught and only a stack trace irrelevant to your tests is produced.</p>
<p>This behavior can be altered through overriding the testcase's run method and catching the exception yourself. Now you can stop the tests whenever you want to and still see what is wrong with your tests.</p>

Вопрос полезен? Да0/Нет0
file_5063.py(377.0б)
None