cobrateam/splinter — pull request #108 by turicas (2011-10-09 09:06:18+00:00)
Title: Show traceback on run tests

If your test file raises some exception (for example: `tests/test_webdriver_firefox.py`) it is not shown when you run tests (with `make test`) because of `__import__` inside function `get_modules`.
I got crazy because I was importing an invalid name (a typo) in a new test I was creating and `make test` simply executes without any output (make just says "Error 1").

The solution is to explicitly catch the exception when using `__import__` and printing it to `sys.stdout` with `traceback.print_exception`.

Note: probably `coverage` or `unittest` override `sys.stderr` since it is not possible to use `traceback.print_exception` with it -- so I used `sys.stdout`.