When using both --last-failed/--lf and --failed-first/--ff pytest would
run all tests with failed tests first (as if --lf was not provied). This
patch changes it so that when using both flags, only the last failed
tests are run. This makes it easier to set --ff as the default behavior
via the config file and then selectively use --lf to only run the last
failed tests.
In a recent refactoring we enabled all __future__ features in pytest
modules, but that has the unwanted side effect of propagating those
features to compile()'d modules inside assertion rewriting, unless
we pass dont_inherit=False to compile().
For some reason pypy raises this warning in the line that the catch_warnings block was added:
______________________________ ERROR collecting ______________________________
C:\ProgramData\chocolatey\lib\python.pypy\tools\pypy2-v5.4.1-win32\lib-python\2.7\pkgutil.py:476: in find_loader
loader = importer.find_module(fullname)
c:\pytest\.tox\pypy\site-packages\_pytest\assertion\rewrite.py:75: in find_module
fd, fn, desc = imp.find_module(lastname, path)
<builtin>/?:3: in anonymous
???
E ImportWarning: Not importing directory 'c:\users\bruno\appdata\local\temp\pytest-of-Bruno\pytest-3192\testdir\test_cmdline_python_package0' missing __init__.py
- pytester was creating a 'pexpect' directory to serve as temporary dir, but due to the fact that
xdist adds the current directory to sys.path, that directory was being considered as candidate
for import as a package. The directory is empty and a warning was being raised about
it missing __init__ file, which is now turned into an error by our filterwarnings config
in pytest.ini.
- Decided to play it safe and ignore any warnings during `pytest.importorskip`.
- pytest-xdist and execnet raise two warnings which should be fixed upstream:
pytest-dev/pytest-xdist/issues/133
this allows a clear addition of parameterization parameters that carry along marks
instead of nesting multiple mark objects and destroying the possibility of creating
function valued parameters,
it just folders everything together into one object carrfying parameters, and the marks.