--- you can reply above this line ---

New issue 125: py.test exits when TypeError raises in __init__
http://bitbucket.org/hpk42/py-trunk/issue/125/pytest-exits-when-typeerror-raises-in

Alfredo Deza / alfredodeza on Sun, 3 Oct 2010 15:56:09 +0200:

Description:
  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:
{{{
#!bash

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

Responsible:
  hpk42
-- 
This is an issue notification from bitbucket.org.
You are receiving this either because you are the
owner of the issue, or you are following the issue.
_______________________________________________
py-dev mailing list
py-dev@codespeak.net
http://codespeak.net/mailman/listinfo/py-dev

Reply via email to