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_hg.py ================ test session starts ============== platform darwin -- Python 2.6.1 -- pytest-1.3.4 -- /Users/alfredo/python/vpacha/bin/python test path 1: test_hg.py

test_hg.py:43: TestHg.test_clone FAIL test_hg.py:64: TestHg.test_commit %
}}}

This is how running it with Python looks:

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


Traceback (most recent call last): File "test_hg.py", 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