Hi Armin, (CC to py-dev) On Wed, Sep 03, 2008 at 12:10 +0200, Armin Rigo wrote: > Hi Holger, > > On Wed, Sep 03, 2008 at 10:30:53AM +0200, holger krekel wrote: > > i think the/a test should go to > > > > py/code/testing/test_excinfo.py:430 > > True, I can add a test there. But I had to change a few small things in > py/test/ too, so the existing test should not be removed.
ok let's have both. > > also, i wonder if "tb=crash" would be useful so that only the > > crashing function is shown. > > Not for me. I don't use tb=short very often, but when I use it it's for > cases where PyPy tests spew tracebacks with a hundred entries. I use > tb=no a lot though. do you mean a few hundred failures? If you mean one failure with a few hundred entries than tb=crash would just show one entry. maybe we better sort this out on IRC :) > One thing I'm really missing from the trunk py.test output is the name > of the failing tests. I know it's often the name of the first function > in the traceback but this is not always reliable (e.g. with generated > code or broken .pyc files). My use case here is again PyPy: often, you > have 5 failures that each spew a lot of stdout and a long traceback. > Figuring out which 5 tests failed takes quite a while. In my > rxvt-terminal-only conftest, I can double-click on the final line that > says "5 failures" and see a list of the names of the failing tests. In > my opinion it would even be useful to always list these names in the > final line, e.g. looking like: > > ============= 2 failures: test_foo, test_bar =============== names are usually much longer, particularly if you include class and module name. > with something reasonable if there are too many failures, e.g.: > > ====== 17 failures: test_foo, test_bar, test_baz, ... ====== > > the point being that it's easy to re-run "py.test -k test_foo" to > reproduce just the first failure, which is often the most relevant one, > without having to use "py.test -x" which can take a long time to run > before it hits the failure. i see the point. hum, we could show a summary (by default or through option) after the tracebacks similar to what you you see with "--verbose", e.g. with curdir=py/doc/ and py.test --verbose pytest/failure_demo.py you currently get pytest/failure_demo.py:15: TestFailing.test_simple FAIL pytest/failure_demo.py:23: TestFailing.test_simple_multiline FAIL pytest/failure_demo.py:28: TestFailing.test_not FAIL pytest/failure_demo.py:33: TestFailing.test_complex_error FAIL pytest/failure_demo.py:40: TestFailing.test_z1_unpack_error FAIL pytest/failure_demo.py:44: TestFailing.test_z2_type_error FAIL ... But a more fundamental solution is to have py.test store info about the last test run (by option and/or some ENV variable) and have options/ways to show and run the last failing tests. The latter is also what we want for the new htmlconftest so i suggest we maybe first concentrate on this. in any case i'd be grateful if you put/copied your hacks around py.test to directories in contrib (maybe with at least one functional test) so that it'seasier to work toegether and ensure that things work after refactorings. best & thanks, holger _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev