Commit Graph

37 Commits

Author SHA1 Message Date
Floris Bruynooghe 4e8438afc8 Simply show the node ID for verbose output
This strips the line number, /@\d/, from the verbose output so it is
directly the node ID of the test.  This in turn means no special logic
for accepting the line number as part of the node ID is needed when
parsing the command line.
2014-08-01 00:29:35 +01:00
holger krekel 07e76cbef2 fix issue364: shorten and enhance tracebacks representation by default.
The new "--tb=auto" option (default) will only display long tracebacks
for the first and last entry.  You can get the old behaviour of printing
all entries as long entries with "--tb=long".  Also short entries by
default are now printed very similarly to "--tb=native" ones.
2014-06-29 13:32:53 +02:00
Andy Freeland 2ba23e8d08 issue504: verbose output displays node IDs for each test
Replace the verbose per-test reporting format of `file:line test_name RESULT`
with the node ID of the test, i.e. `file@line::class::method[param] RESULT`.

This patch does not update the examples in the docs; @hpk42 has a script
to regenerate those.

--HG--
branch : issue504
2014-04-14 17:42:02 -04:00
Floris Bruynooghe e12fe64b54 Include py version in the terminal output
This can help to reproduce bugs when looking at the output pasted into
bug reports.
2014-01-22 11:27:15 +01:00
holger krekel 98135a3d30 remove unusued import 2013-12-12 06:55:05 +01:00
Marc Abramowitz 0278dc9b6f Remove u'' literal in test_color_{yes,no} for Python 3.2 compat
--HG--
branch : color_option
2013-12-08 11:39:55 -08:00
Marc Abramowitz 60f5b15f20 Remove superfluous `monkeypatch` arg to test_color_yes
--HG--
branch : color_option
2013-12-07 12:04:23 -08:00
Marc Abramowitz bec6ee5c29 Assert 'test session starts' in output for test_color_{yes,no}
--HG--
branch : color_option
2013-12-06 11:58:04 -08:00
Marc Abramowitz 23fa4cec61 Add option: --color=(yes/no/auto)
--HG--
branch : color_option
2013-12-06 11:49:48 -08:00
holger krekel 8ac5af2896 fix flakes issues and make --flakes run part of tox runs 2013-10-12 15:39:22 +02:00
holger krekel cec7d47c1f remove fd-fixing attempt at startup of pytest. It's
not clear it's actually needed and it's not nice
to still do FD-dupping when "-s" is specified.
2013-10-03 18:53:40 +02:00
holger krekel ae090740c5 always dupfile if os.dup is available 2013-10-03 16:47:55 +02:00
holger krekel 1fc466e8ac add terminalreporter.section|line methods to print extra information. 2013-09-27 15:48:03 +02:00
holger krekel da7133d201 fix some tests wrt to expecting output now that pytest does no
introduce unwanted "buffering" on "-s" calls.
2013-09-27 12:28:34 +02:00
holger krekel 030c337c68 don't manipulate FDs at all if output capturing is turned off. 2013-09-27 09:49:39 +02:00
holger krekel 8f24e10571 add changelog entry for anthon's hynek-fication of options,
and change the docs and tests to use the new style.
2013-08-01 17:32:19 +02:00
Katarzyna Jachim ffa1bf726d merge 2013-07-06 15:54:33 +02:00
Katarzyna Jachim 87df85f12d improved reporting
added intermediate level of quiet reporting:
 * -q now shows short summary (# passed/failed tests + time)
 * the former -q is now -qq
2013-07-06 15:43:59 +02:00
Anatoly Bubenkov 2c7613c15c merge with upstream 2013-07-06 10:06:12 +02:00
maho 9e3cd03721 #299 - polishing 2013-05-08 17:01:20 +02:00
Floris Bruynooghe c93fbb0e57 Load conftest files in the correct order initially
When the conftest.py files are looked for intially they got loaded
starting from the subdir ending at the parent dir(s).  Later on during
collection any conftest.py files are loaded starting from the parent
dir ending at the subdir.  Due to how extending fixtures works the
latter is correct as otherwise the wrong fixture will be available.
So this changes the initial conftest loading to start at the root and
go towards the subdir.

This does also affect the order of other hooks, hence the order of the
reporting being different in testing/test_terminal.py.
2013-04-18 12:24:53 +01:00
holger krekel bb07ba7807 rename a number of internal and externally visible variables to use the fixture name
rather than funcargs.  Introduce .funcargnames compatibility attribute for backward compat.
2012-10-05 14:24:44 +02:00
holger krekel ccc04b9fc4 some refinements to reporting and hook order 2012-06-21 11:07:22 +02:00
holger krekel 18306a4644 add header info: always report 3rd party plugins in test runs 2012-06-20 00:16:47 +02:00
holger krekel e18abfd013 fix issue143 - call unconfigure/sessionfinish always when
configure/sessionstart where called

use exitcode 4 (instead of 3 which signaled an internal error)
when an initial directory/file was not found
2012-05-17 23:11:23 +02:00
Ronny Pfannschmidt 78e7d7aed0 more quit collectonly shows only files and the number of tests in them 2012-02-03 16:56:06 +01:00
Ronny Pfannschmidt 68b353be0d create session.items before preparse, so collectonly wont break on preparse fail, fixes #115 2012-02-03 16:33:32 +01:00
holger krekel f7c1b9087a fix test 2011-11-11 23:18:33 +00:00
holger krekel 650c3bcfde enhance debug tracing: print trace tags at the end of message and forget about "prefix".
Always log to "pytestdebug.log" if "--debug" option is given.
also move related code to pytest_helpconfig plugin.
2011-07-14 19:11:50 +02:00
holger krekel f3bc197afb fix #59: provide better Jenkins stdout and stderr sections 2011-07-12 23:09:03 +02:00
holger krekel d1684e8052 report keyboardintterupt even if inteerrupted during sessionstartup 2011-07-07 21:24:09 +02:00
Benjamin Peterson 2618e3640f account for quotes in error messages 2011-06-03 22:11:00 -05:00
holger krekel 1a7c6ecc42 fix slightly wrong verbose output for non subclasses on windows 2011-03-08 13:37:00 +01:00
holger krekel c552b58dc5 fix issue27 - --collectonly and -k keyword selection now work together.
internally, collectonly and terminal reporting has been unified.
2011-03-06 18:32:00 +01:00
holger krekel 0357d3afda refine initialization and collection reporting, introduce a progress bar 2010-11-22 11:59:56 +01:00
holger krekel a698465487 streamline docs, especially use "import pytest" and "pytest.*" in python code examples instead of "import py" and "py.test.*". 2010-11-17 22:12:16 +01:00
holger krekel 076e03e90f also un-nest test directory 2010-11-13 11:30:40 +01:00