allankp / pytest-testrail

pytest plugin for integration with TestRail, for creating testruns and updating results
MIT License
95 stars 125 forks source link

PytestUnknownMarkWarning: Unknown pytest.mark.testrail - is this a typo #124

Closed andrey-semakin closed 4 years ago

andrey-semakin commented 4 years ago

Describe the bug pytest shows following warning:

============= warnings summary ================
/path/to/venv/lib/python3.7/site-packages/_pytest/mark/structures.py:325
  /path/to/venv/lib/python3.7/site-packages/_pytest/mark/structures.py:325: PytestUnknownMarkWarning: Unknown pytest.mark.testrail - 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,

We use only @pytestrail.case(...) decorators, not @pytest.mark.testrail, so it should be something internal for pytest-testrail.

To Reproduce Steps to reproduce the behavior:

  1. Use @pytestrail.case decorator;
  2. Run pytest;
  3. See warning

Expected behavior No warnings expected. I want test runs to be green, not yellow! 😄

Additional context Python 3.7.5.

pytest==5.2.1
pytest-testrail==2.8.3
andrey-semakin commented 4 years ago

Workaround is to register a custom testrail marker as described here: http://doc.pytest.org/en/latest/example/markers.html#registering-markers Or copy this file: https://github.com/allankp/pytest-testrail/blob/master/pytest.ini to your project.