Skip to content

Commit

Permalink
[internal] Register platform_specific_behavior marker with Pytest (p…
Browse files Browse the repository at this point in the history
…antsbuild#12679)

Follow up on pantsbuild#12665 (comment). While custom markers work even if they're not registered, it results in a warning (as found by @stuhood):

>   /private/var/folders/bg/_r10hqp14kjcpv68yzdk5svc0000gn/T/process-executionaB8Qfx/src/python/pants/backend/python/typecheck/mypy/rules_integration_test.py:107: PytestUnknownMarkWarning: Unknown pytest.mark.platform_specific_behavior - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
    @pytest.mark.platform_specific_behavior

Per https://docs.pytest.org/en/stable/mark.html#registering-marks, we should register this.

[ci skip-rust]
[ci skip-build-wheels]
  • Loading branch information
Eric-Arellano authored Jun 9, 2022
1 parent 5521b15 commit cf9d56e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ line_length = 100
color_output = true
known_first_party = ["internal_plugins", "pants", "pants_test"]

[tool.pytest.ini_options]
markers = ["platform_specific_behavior"]

[tool.coverage.report]
# We inject this file at test time (see src/python/pants/conftest.py), and so
# coverage will gather stats for it, but it doesn't correspond to a real source file,
Expand Down

0 comments on commit cf9d56e

Please sign in to comment.