Skip to content

Commit

Permalink
Register markers to avoid pytest warnings (#289)
Browse files Browse the repository at this point in the history
Previously we'd get a bunch of warnings like this when running tests:

```
test/integration/test_groundlight.py:373
  /home/ubuntu/ptdev/python-sdk/test/integration/test_groundlight.py:373: PytestUnknownMarkWarning: Unknown pytest.mark.skip_for_edge_endpoint - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.skip_for_edge_endpoint(reason="The edge-endpoint does not support passing detector metadata.")
```

According to [the
docs](https://docs.pytest.org/en/stable/how-to/mark.html), unregistered
markers will always produce these warnings. By registering our two
custom markers, we don't get these warnings anymore.

---------

Co-authored-by: Auto-format Bot <[email protected]>
  • Loading branch information
CoreyEWood and Auto-format Bot authored Dec 6, 2024
1 parent ec41e82 commit 8f798c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ no_sort_tables = true
spaces_indent_inline_array = 4
trailing_comma_inline_array = true

[tool.pytest.ini_options]
markers = [
"skip_for_edge_endpoint",
"run_only_for_edge_endpoint",
]

[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.2.0"]

0 comments on commit 8f798c5

Please sign in to comment.