pytest-ordering
pytest-ordering copied to clipboard
Unknown mark warning
When I use the following code to mark a whole test file to be run last:
pytestmark = pytest.mark.last
I always get the following warning at the end of the test run:
=========================== warnings summary ============================
c:\users\rnd10\appdata\local\programs\python\python37-32\lib\site-packages\_pytest\mark\structures.py:332
c:\users\rnd10\appdata\local\programs\python\python37-32\lib\site-packages\_pytest\mark\structures.py:332: PytestUnknownMarkWarning: Unknown pytest.mark.last - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
PytestUnknownMarkWarning,
-- Docs: https://docs.pytest.org/en/latest/warnings.html
Note that the ordering works as expected. My version info:
platform win32 -- Python 3.7.3, pytest-5.0.1, py-1.8.0, pluggy-0.12.0
plugins: cov-2.7.1, ordering-0.6, pycharm-0.5.0
Hi @ftobia I got the same with pytest.last ... on osx
Hi,
same here. Debian buster
pytest==5.2.3 pytest-ordering==0.6
best and thanks
Same here:
$ pipenv run pipfreeze | grep pytest
pytest==5.3.4
pytest-django==3.8.0
pytest-ordering==0.6
Running on OX as well as using Alpine under Docker.
Same here with pytest.mark.first
even though it works as intended
yes, it works as intended - I'm using pytest.mark.last. I did try adding the mark to the list programmatically but it didn't work for me; guessing it created a different mark object.
#55 fixes this. Please release a new version (and include LICENSE and the tests into the PYPI package)
Still seeing this with:
pytest-flask==1.0.0
pytest-forked==1.3.0
pytest-mock==3.3.1
pytest-ordering==0.6
pytest-remotedata==0.3.2
pytest-timeout==1.4.2
pytest-xdist==1.20.1
pytest==6.0.2
PytestUnknownMarkWarning: Unknown pytest.mark.first - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
Is it possible to trigger a release with the fix mentioned above? #55
When I use @pytest.mark.first, have got same problems.
Here is my env, with python 3.8.5. pytest == 6.2.1 pytest-dependency == 0.5.1 pytest-html == 3.1.1 pytest-metadata == 1.11.0 pytest-ordering == 0.6
This just popped up for me too
pytest==6.2.3
pytest-ordering==0.6
pytest-ordering des not look like it is still maintained. Use pytest-order instead. Or even better: Make your tests independent of each other, putting common setup and teardown stuff into fixtures!