We have a bunch of tests that call Python C/C++ bindings. We run these tests with nose:
nosetests myapp
.....
----------------------------------------------------------------------
Ran 5 tests in 0.009s
Sometimes, it happens that our bindings are buggy, causing the Python interpreter to crash, say, on test number 3:
test03_badcode (myapp.tests.test_badcode) ... Segmentation fault
Question: What is the best way to recover from this? Ideally, I would prefer nose handled these crashes itself, but I understand this is impossible to achieve. The next solution I thought of would be to take note of the test and re-start nose, now skipping the bad test. In my example, this would mean to execute tests 1, 2, 4 and 5, but not test 3. Is there a way to achieve this programatically with nose? Any other better ideas?