Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown mark warning #57

Open
danielschenk opened this issue Aug 14, 2019 · 10 comments
Open

Unknown mark warning #57

danielschenk opened this issue Aug 14, 2019 · 10 comments
Labels

Comments

@danielschenk
Copy link

danielschenk commented Aug 14, 2019

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
@MRigal
Copy link

MRigal commented Sep 13, 2019

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

@ftobia ftobia added the bug label Oct 9, 2019
@dodger82
Copy link

Hi,

same here. Debian buster

pytest==5.2.3
pytest-ordering==0.6

best and thanks

@BenjamenMeyer
Copy link

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.

@zicvic
Copy link

zicvic commented Jan 31, 2020

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

@BenjamenMeyer
Copy link

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.

@bnavigator
Copy link

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

@jgrobbel
Copy link

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

@Flobbidinous
Copy link

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

@henrickgoldwurm
Copy link

This just popped up for me too

pytest==6.2.3
pytest-ordering==0.6

@bnavigator
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants