py.test exits when TypeError raises in __init__

Create issue
Issue #125 invalid
Alfredo Deza created an issue

When testing a class that raises TypeError (the test assumed the init had an attribute that didn't exist) py.test exits without a traceback.

Even when running py.test in verbose mode or with --fulltrace it still doesn't report why the test is failing.

Running the test with python (e.g. no test suite) the traceback is reported correctly.

This is how it looks with py.test:

{{{ py.test --fulltrace -v ================ test session starts ============== platform darwin -- Python 2.6.1 -- pytest-1.3.4 -- /Users/alfredo/python/vpacha/bin/python test path 1: TestHg.test_clone FAIL TestHg.test_commit %

This is how running it with Python looks:

{{{ python
EEEEEEEEEE =========================== ERROR: Builds a mercurial repo and commits

Traceback (most recent call last): File "", line 71, in test_commit conf=self.dict_conf) TypeError: init() got an unexpected keyword argument 'conf'


I'm truncating the rest of tests that fail running with Python and showing the full output with py.test

Comments (4)

  1. Alfredo Deza reporter

    I'm closing this ticket because I can't recreate the problem or recreate it with the same test.

    If this comes up again, I will try to pin down the exact conditions and will provide a full example that I'm able to reproduce.

    Thanks for answering so fast!

  2. Log in to comment