Commit Graph

197 Commits

Author SHA1 Message Date
Ronny Pfannschmidt 2b92fee1c3 initial conversion of exit codes to enum 2019-06-15 06:48:00 +02:00
Anthony Sottile be2be040f9 Clean up u' prefixes and py2 bytes conversions 2019-06-04 17:50:34 -07:00
Anthony Sottile a91fe1fedd pre-commit run pyupgrade --all-files 2019-06-03 12:08:02 -03:00
Anthony Sottile 3f1ec520fc pre-commit run reorder-python-imports --all-files 2019-06-03 12:08:01 -03:00
Anthony Sottile 5034399d7a pre-commit run fix-encoding-pragma --all-files 2019-06-03 12:08:01 -03:00
Daniel Hahler e032904413 Merge master into features 2019-05-28 01:46:16 +02:00
Daniel Hahler f9f41e69a8 reportopts: A: put "Pp" in front 2019-05-23 09:40:16 +02:00
Anthony Sottile dc75b6af47 Use fix-encoding-pragma pre-commit hook 2019-05-14 15:56:31 -07:00
Daniel Hahler 5eeb5ee960
Merge pull request #5013 from blueyed/short-summary-message
Display message from reprcrash in short test summary
2019-05-08 22:01:04 +02:00
Bruno Oliveira 32a5e80a6d Add encoding: header and fix rep mock in test_line_with_reprcrash on py27 2019-05-05 09:33:37 -03:00
Bruno Oliveira 0e8a8f94f6 Add encoding header to test_terminal.py 2019-05-05 09:14:07 -03:00
Bruno Oliveira fb6dad60a0
terminal: use pytest_collection_finish for reporting (#5113)
terminal: use pytest_collection_finish for reporting
2019-04-29 08:00:48 -03:00
Daniel Hahler ff5317a7f3 terminal: use pytest_collection_finish for reporting 2019-04-29 05:20:04 +02:00
Daniel Hahler c3178a176d move test 2019-04-17 15:30:34 +02:00
Daniel Hahler df1d1105b0 Merge remote-tracking branch 'origin/features' into short-summary-message
Conflicts:
	src/_pytest/skipping.py
2019-04-17 15:30:19 +02:00
Daniel Hahler ea79eb5c3f terminal summary: display passes after warnings
This displays passes (with output, `-rP`) before the short summary, and
before any other output from other plugins also.
2019-04-15 16:31:42 +02:00
Bruno Oliveira 19035f4b55
Merge pull request #5068 from blueyed/reportchars
Add support for reportchars=A (`-rA`)
2019-04-12 08:13:22 -03:00
Daniel Hahler 06029d11d3 Refactor into TerminalReporter.short_test_summary 2019-04-07 19:49:18 +02:00
Daniel Hahler c70ecd49ca cleanup: move terminal summary code to terminal plugin
Fixes https://github.com/pytest-dev/pytest/issues/5067.
2019-04-07 18:22:04 +02:00
Daniel Hahler 50edab8004 Add tests for reportchars=a
Ref: https://github.com/pytest-dev/pytest/issues/5066
2019-04-07 18:05:33 +02:00
Daniel Hahler b4b9f788af Support reportchars=A (really all, including passed) 2019-04-07 18:05:33 +02:00
Daniel Hahler 159704421e change separator to hyphen 2019-04-05 12:21:24 +02:00
Daniel Hahler 37ecca3ba9 factor out _get_line_with_reprcrash_message 2019-04-04 22:13:28 +02:00
Daniel Hahler 3d0ecd03ed Display message from reprcrash in short test summary
This is useful to see common patterns easily, but also for single
failures already.
2019-04-04 18:49:13 +02:00
Bruno Oliveira 057c97812b
Merge pull request #4975 from blueyed/verbose-fixes
Fix usages of "verbose" option
2019-03-26 18:38:39 -03:00
Daniel Hahler 23146e7527 Fix usages of "verbose" option
With `-qq` `bool(config.getoption("verbose"))` is True; it needs to be
checked for `> 0`.
2019-03-26 10:11:25 +01:00
Daniel Hahler 7da7b9610c minor: whitespace 2019-03-24 11:20:24 +01:00
Daniel Hahler cc6e5ec345 tests: add test_report_collect_after_half_a_second
This is meant for stable coverage with "collecting X item(s)".
2019-03-20 22:13:11 +01:00
Bruno Oliveira 1a119a22d1 Internal refactorings in order to support the new pytest-subtests plugin
Related to #1367
2019-03-19 18:20:41 -03:00
Bruno Oliveira 0deb7b1696 Do not show "inifile:" string if there's no configuration file 2019-03-02 11:45:08 -03:00
Bruno Oliveira 53b8aa065c Show testpaths option in the header if it has been used for collection
Fix #4875
2019-03-02 11:35:32 -03:00
Bruno Oliveira 54af0f4c65 Call pytest_report_collectionfinish hook when --collect-only is passed
Fix #2895
2019-02-06 12:58:23 -02:00
Bruno Oliveira ade5f2c8c5 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2019-01-29 19:36:56 -02:00
wim glenn 0f546c4670
pytest_terminal_summary uses result from pytest_report_teststatus hook, rather than hardcoded strings
Less hacky way to make XPASS yellow markup. Make sure collect reports still have a "when" attribute.

xfail changed to XFAIL in the test report, for consistency with other outcomes which are all CAPS
2019-01-24 10:17:29 -06:00
Kristoffer Nordstroem 6d38868950 fix tests by adding additional output to expected responses 2019-01-24 00:08:43 +01:00
Anthony Sottile 16546b7342 Remove some dead code
- I wrote a thing: https://github.com/asottile/dead
- wanted to try it out, there's lots of false positives and I didn't look
  through all the things it pointed out but here's some
2019-01-13 20:41:30 -08:00
Jeffrey Rackauckas 1eef53b6fe Update --collect-only to display test descriptions when ran in verbose mode. 2018-12-29 22:46:46 -08:00
Daniel Hahler 8e287c5c77 Merge master into features 2018-12-14 16:44:43 +01:00
Daniel Hahler 64ee1ee81b tests: fix tests that require PYTEST_DISABLE_PLUGIN_AUTOLOAD to be unset
Fix pytest's own tests with PYTEST_DISABLE_PLUGIN_AUTOLOAD=1.
2018-12-09 12:06:18 +01:00
Anthony Sottile b88c3f8f82 Deprecate pytest.config 2018-12-03 09:01:42 -08:00
Ronny Pfannschmidt 7eb28f9eb7 remove yield tests and compat properties 2018-11-30 10:40:13 +01:00
Anthony Sottile 1bba0a9714 Deprecate `raises(..., 'code(as_a_string)')` / `warns(..., 'code(as_a_string)') 2018-11-29 09:34:51 -08:00
Anthony Sottile e9b2475e29 Display actual test ids in `--collect-only` 2018-11-25 09:33:18 -08:00
Daniel Hahler be3b8fc9c1 Fix warnings summary header appearing twice
Ref: https://github.com/pytest-dev/pytest/pull/4450#discussion_r236017645
Ref: https://github.com/pytest-dev/pytest/pull/4399
2018-11-23 22:47:58 +01:00
Daniel Hahler 0cf45ee18a Display "short test summary info" after (main) warnings again
Fixes https://github.com/pytest-dev/pytest/issues/3952.
2018-11-23 20:06:09 +01:00
Anthony Sottile b3700f61ba Fix formatting of print() calls 2018-11-22 00:15:14 -08:00
Bruno Oliveira dc20dedbc7 Change RemovedInPytest4Warnings to errors by default
To keep existing tests which emit RemovedInPytest4Warnings running, decided
to go with a command line option because:

* Is harder to integrate an ini option with tests which already use an ini file
* It also marks tests which need to be removed/updated in 4.1, when
  RemovedInPytest4Warning and related functionality are removed.

Fix #3737
2018-11-12 16:10:57 -02:00
Anthony Sottile 2368fbb63c Apply reorder-python-imports to all files 2018-10-25 00:01:29 -07:00
Thomas Hisch e8c220b9bd Increase required verbosity level for debug output
To show the subclassed file in legacy test suits in the runtest output
you have to set the verbosity level to at least "-vv" now.

Closes #3211
2018-10-15 20:38:32 +02:00
Denis Otkidach 808df48ee8 Test for excluding empty reports for passed tests 2018-09-26 16:44:00 +03:00