pytest-dev / pytest-forked

extracted --boxed from pytest-xdist to ensure backward compat
MIT License
62 stars 21 forks source link

Implement support for pytest 6 #46

Closed bluetech closed 4 years ago

bluetech commented 4 years ago

This PR makes the testsuite pass when run against pytest 6 master (will be pytest 6.0.0).

The first two commits fix #45, by @The-Compiler.

Third commit just changes @pytest.mark.tryfirst -> @pytest.hookimpl because it is the modern way to do it (supported since pytest 2.8.0 I think so should be fine).

Fourth commit fixes #31. This is needed anyway, but a pytest commit https://github.com/pytest-dev/pytest/commit/796fba67880c9ce2011d4183dd574339e26618fa made it necessary for the tests here to pass.

Fifth commit changes how the RuntimeWarning is ignored otherwise its out is interleaved with pytest's output which makes the matching fail.

Last commit adds tox -e pytestmaster for easy testing of pytest master. I haven't added it to CI, as it might be unstable, but let me know if this is something you want. Didn't add pytest 6 to CI either, didn't want to add a prerelease.

webknjaz commented 4 years ago

@bluetech I'd prefer to have both rc and master mapped to CI. We can always temporarily mark them as allowed to fail if anything starts failing.

bluetech commented 4 years ago

I'd prefer to have both rc and master mapped to CI. We can always temporarily mark them as allowed to fail if anything starts failing.

Added. This adds 10 new CI jobs (actually I noticed I didn't exclude them from Py2.7 - let me fix that - so it's 8 new jobs).

webknjaz commented 4 years ago

~@bluetech I don't think dropping py2 is in scope...~ Oh... you mean avoid running pytest 6 under py2

bluetech commented 4 years ago

Oh... you mean avoid running pytest 6 under py2

Right. Also, since for python2 pytestlatest is equivalent to pytest46 (and there will be no more releases for that), I also excluded that for Python 2.