Commit Graph

21 Commits

Author SHA1 Message Date
symonk c58abf7ad1 #7942 refactor stepwise tests to utilize pytester 2020-10-30 19:21:42 +00:00
Simon K 6cddeb8cb3
#7938 - [Plugin: Stepwise][Enhancements] Refactoring, smarter registration & --sw-skip functionality (#7939)
* adding --sw-skip shorthand for stepwise skip

* be explicit rather than implicit with default args for stepwise

* add constant for sw cache dir; only register plugin if necessary rather check check activity always;

* use str format; remove unused args in hooks

* assert cache upfront, allow stepwise to have a reference to the cache

* type hinting lf, skip, move literal strings into module constants

* convert parametrized option into a list

* add a sessionfinish hook for stepwise to keep backwards behaviour the same

* add changelog for #7938

* Improve performance of stepwise modifyitems & address PR feedback

* add test for stepwise deselected based on performance enhancements

* Apply suggestions from code review

* delete from items, account for edge case where failed_index = 0

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-10-30 19:13:06 +00:00
Ran Benita 1ae4182e18
testing: fix flaky tests on pypy3 due to resource warnings in stderr (#7405) 2020-06-26 09:50:19 -03:00
Daniel Hahler a136111dcc tests: test_xfail_handling: use sys.dont_write_bytecode 2020-01-11 23:05:12 +01:00
Daniel Hahler 4e45472405 Merge master into features
Conflicts:
	src/_pytest/debugging.py
2019-11-06 14:22:07 +01:00
Patrick Harmon abc890079f typos 2019-10-31 23:19:35 -05:00
MarcoGorelli d863c30c74 Fix plurality mismatch for and in pytest terminal summary 2019-10-27 15:16:24 +00:00
Miro Hrončok ab39502c98 In test_xfail_handling, only remove __pycache__ if it exists
Previously, the test failed when the directory was not present,
which could have been caused for example by invoking the tests
with PYTHONDONTWRITEBYTECODE=1.

Fixes https://github.com/pytest-dev/pytest/issues/5664
2019-07-26 02:23:14 +02:00
Bruno Oliveira 8651d880a0 Handle xfail(strict=True) properly in --step-wise mode
Fix #5547
2019-07-04 20:28:37 -03:00
Bruno Oliveira c94e9b6145
Fix test docstring 2019-06-13 23:10:13 -03:00
Bruno Oliveira bc345ac980 Remove handling of collection errors by --sw
Since then pytest itself adopted the behavior of interrupting
the test session on collection errors, so --sw no longer needs
to handle this.

The --sw behavior seems have been implemented when pytest
would continue execution even if there were collection errors.
2019-06-13 17:19:36 -03:00
Bruno Oliveira 4cc05a657d Fix --sw crash when first file in cmdline fails to collect
Fix #5444
2019-06-13 16:47:01 -03:00
Thomas Grainger ad15efc7ea
add test for stepwise attribute error Refs: #5444 2019-06-13 12:39:49 +01:00
Anthony Sottile 5034399d7a pre-commit run fix-encoding-pragma --all-files 2019-06-03 12:08:01 -03:00
Anthony Sottile dc75b6af47 Use fix-encoding-pragma pre-commit hook 2019-05-14 15:56:31 -07:00
Bruno Oliveira 685ca96c71 Change ``--strict`` to ``--strict-markers``, preserving the old one
Fix #5023
2019-05-09 19:36:38 -03:00
Bruno Oliveira f8f22d29ee Use a custom cache directory for test_stepwise tests
Otherwise the tests will use tox's env cache which makes them flaky
2018-11-12 16:57:39 -02:00
David Szotten 8187c148d9 now pinned to pytest version 2018-10-15 20:04:39 +01:00
David Szotten e773c8ceda linting 2018-10-15 20:04:39 +01:00
David Szotten 63c01d1541 update for builtin plugin 2018-10-15 20:04:39 +01:00
David Szotten c56d7ac40e move files into the pytest file structure 2018-10-15 20:04:39 +01:00