From 8f798c5c2c2935447693a9c4b9f2fe1a1a564864 Mon Sep 17 00:00:00 2001 From: CoreyEWood Date: Thu, 5 Dec 2024 16:33:32 -0800 Subject: [PATCH] Register markers to avoid pytest warnings (#289) 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 --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f9ea6f19..69a5e792 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"]