Skip to content

Commit 50122d2

Browse files
[flake8-pytest-style] Add fix safety documentation for duplicate-parameterize-test-cases (#9678)
See: #8482 (comment).
1 parent ad2cfa3 commit 50122d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ impl Violation for PytestParametrizeValuesWrongType {
226226
/// ...
227227
/// ```
228228
///
229+
/// ## Fix safety
230+
/// This rule's fix is marked as unsafe, as tests that rely on mutable global
231+
/// state may be affected by removing duplicate test cases.
232+
///
229233
/// ## References
230234
/// - [`pytest` documentation: How to parametrize fixtures and test functions](https://docs.pytest.org/en/latest/how-to/parametrize.html#pytest-mark-parametrize)
231235
#[violation]

0 commit comments

Comments
 (0)