With the code
import unittest
import time
class SleepingTest(unittest.TestCase):
def test_that_gets_stuck(self):
for a in xrange(100000000000000000):
pass
I get this output
❯ nosetests use_nosetest.py
^C
----------------------------------------------------------------------
Ran 1 test in 4.267s
OK
As you can see, I did Ctrl+C to interrupt the program. But nose says it ran the test OK. I was rather hoping for it to say that the test fails and give me a stack trace.
Is there any way I can have a stack trace printed from where my tests get stuck?