---
source: crates/ruff_linter/src/rules/flake8_pytest_style/mod.rs
---
PT028 [*] Test function parameter `a` has default argument
 --> is_pytest_test.py:3:27
  |
1 | # Errors
2 |
3 | def test_this_is_a_test(a=1): ...
  |                           ^
4 | def testThisIsAlsoATest(a=1): ...
  |
help: Remove default argument
  |
2 |
  - def test_this_is_a_test(a=1): ...
3 + def test_this_is_a_test(a): ...
4 | def testThisIsAlsoATest(a=1): ...
  |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
 --> is_pytest_test.py:4:27
  |
3 | def test_this_is_a_test(a=1): ...
4 | def testThisIsAlsoATest(a=1): ...
  |                           ^
5 |
6 | class TestClass:
  |
help: Remove default argument
  |
3 | def test_this_is_a_test(a=1): ...
  - def testThisIsAlsoATest(a=1): ...
4 + def testThisIsAlsoATest(a): ...
5 |
  |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
 --> is_pytest_test.py:7:41
  |
6 | class TestClass:
7 |     def test_this_too_is_a_test(self, a=1): ...
  |                                         ^
8 |     def testAndOfCourseThis(self, a=1): ...
  |
help: Remove default argument
  |
6 | class TestClass:
  -     def test_this_too_is_a_test(self, a=1): ...
7 +     def test_this_too_is_a_test(self, a): ...
8 |     def testAndOfCourseThis(self, a=1): ...
  |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
 --> is_pytest_test.py:8:37
  |
6 | class TestClass:
7 |     def test_this_too_is_a_test(self, a=1): ...
8 |     def testAndOfCourseThis(self, a=1): ...
  |                                     ^
  |
help: Remove default argument
  |
7 |     def test_this_too_is_a_test(self, a=1): ...
  -     def testAndOfCourseThis(self, a=1): ...
8 +     def testAndOfCourseThis(self, a): ...
9 |
  |
note: This is a display-only fix and is likely to be incorrect
