Skip to content

Commit

Permalink
Add platform_specific_behavior tag to test targets that use mark (#21609
Browse files Browse the repository at this point in the history
)

This PR adds the `platform_specific_behavior` tag to the `python_test`
targets of 4 additional test files in this repo.

These test files use this repo's custom
`pytest.mark.platform_specific_behavior` mark to indicate tests are
high-value to test on non-Linux-x86_64 platforms. However, they were not
being run in CI because the testing invocation uses both Pants-level tag
and Pytest-level mark filtering: `./pants
--tag=+platform_specific_behavior test :: -- -m
platform_specific_behavior`.

This PR fixes the current problems identified in #21608, but doesn't
stop us from making the same mistakes in future (and thus doesn't close
that ticket).
  • Loading branch information
huonw authored Nov 4, 2024
1 parent f46d992 commit 036c61a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/python/pants/backend/build_files/fmt/black/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@

python_sources()

python_tests(name="tests")
python_tests(
name="tests",
overrides={
"integration_test.py": {
"tags": ["platform_specific_behavior"],
}
},
)
9 changes: 8 additions & 1 deletion src/python/pants/backend/build_files/fmt/ruff/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@

python_sources()

python_tests(name="tests")
python_tests(
name="tests",
overrides={
"integration_test.py": {
"tags": ["platform_specific_behavior"],
}
},
)
9 changes: 8 additions & 1 deletion src/python/pants/backend/build_files/fmt/yapf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@

python_sources()

python_tests(name="tests")
python_tests(
name="tests",
overrides={
"integration_test.py": {
"tags": ["platform_specific_behavior"],
}
},
)
5 changes: 5 additions & 0 deletions src/python/pants/backend/sql/lint/sqlfluff/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ python_sources(

python_tests(
name="tests",
overrides={
"rules_integration_test.py": {
"tags": ["platform_specific_behavior"],
}
},
)

0 comments on commit 036c61a

Please sign in to comment.