nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 397 forks source link

Nose ignores process termination when running in multiprocess mode #1088

Open karpadbugatone opened 5 years ago

karpadbugatone commented 5 years ago

This issue occurs when running tests that load an external library using ctypes. If there's an early process termination inside the loaded library, we expect this test to fail. This is indeed what happens when nose is executed in single-process mode. However, when the same test is executed in multiprocess mode, the test hangs until it's timed out and then it's considered passed.

Example: test.py:

def test_crash():
   import ctypes
   ctypes.cdll.LoadLibrary("libc.so.6").free(1)

Test fails when running: python -m nose test.py but passes when running: python -m nose test.py -processes=2