pytest-ordering icon indicating copy to clipboard operation
pytest-ordering copied to clipboard

Unknown mark warning

Open danielschenk opened this issue 5 years ago • 10 comments

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

danielschenk avatar Aug 14 '19 10:08 danielschenk

Hi @ftobia I got the same with pytest.last ... on osx

MRigal avatar Sep 13 '19 16:09 MRigal

Hi,

same here. Debian buster

pytest==5.2.3 pytest-ordering==0.6

best and thanks

dodger82 avatar Nov 15 '19 10:11 dodger82

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.

BenjamenMeyer avatar Jan 28 '20 20:01 BenjamenMeyer

Same here with pytest.mark.first even though it works as intended

zicvic avatar Jan 31 '20 10:01 zicvic

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.

BenjamenMeyer avatar Jan 31 '20 15:01 BenjamenMeyer

#55 fixes this. Please release a new version (and include LICENSE and the tests into the PYPI package)

bnavigator avatar Mar 20 '20 23:03 bnavigator

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

jgrobbel avatar Sep 21 '20 09:09 jgrobbel

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

Flobbidinous avatar Jan 06 '21 06:01 Flobbidinous

This just popped up for me too

pytest==6.2.3
pytest-ordering==0.6

henrickgoldwurm avatar Apr 29 '21 20:04 henrickgoldwurm

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!

bnavigator avatar Apr 29 '21 20:04 bnavigator