test: fix to fail exit when exception occurs.

sys.exit() is a function.