---
source: crates/ruff_linter/src/rules/flake8_pytest_style/mod.rs
---
PT007 [*] Wrong values type in `pytest.mark.parametrize` expected `list`
 --> PT007.py:4:35
  |
4 | @pytest.mark.parametrize("param", (1, 2))
  |                                   ^^^^^^
5 | def test_tuple(param):
6 |     ...
  |
help: Use `list` for parameter values
  |
3 |
  - @pytest.mark.parametrize("param", (1, 2))
4 + @pytest.mark.parametrize("param", [1, 2])
5 | def test_tuple(param):
  |
note: This is an unsafe fix and may change runtime behavior

PT007 [*] Wrong values type in `pytest.mark.parametrize` expected `list` of `list`
  --> PT007.py:11:5
   |
 9 |   @pytest.mark.parametrize(
10 |       ("param1", "param2"),
11 | /     (
12 | |         (1, 2),
13 | |         (3, 4),
14 | |     ),
   | |_____^
15 |   )
16 |   def test_tuple_of_tuples(param1, param2):
   |
help: Use `list` of `list` for parameter values
   |
10 |     ("param1", "param2"),
   -     (
11 +     [
12 |         (1, 2),
13 |         (3, 4),
   -     ),
14 +     ],
15 | )
   |
note: This is an unsafe fix and may change runtime behavior

PT007 [*] Wrong values type in `pytest.mark.parametrize` expected `list` of `list`
  --> PT007.py:12:9
   |
10 |     ("param1", "param2"),
11 |     (
12 |         (1, 2),
   |         ^^^^^^
13 |         (3, 4),
14 |     ),
   |
help: Use `list` of `list` for parameter values
   |
11 |     (
   -         (1, 2),
12 +         [1, 2],
13 |         (3, 4),
   |
note: This is an unsafe fix and may change runtime behavior

PT007 [*] Wrong values type in `pytest.mark.parametrize` expected `list` of `list`
  --> PT007.py:13:9
   |
11 |     (
12 |         (1, 2),
13 |         (3, 4),
   |         ^^^^^^
14 |     ),
15 | )
   |
help: Use `list` of `list` for parameter values
   |
12 |         (1, 2),
   -         (3, 4),
13 +         [3, 4],
14 |     ),
   |
note: This is an unsafe fix and may change runtime behavior

PT007 [*] Wrong values type in `pytest.mark.parametrize` expected `list` of `list`
  --> PT007.py:22:5
   |
20 |   @pytest.mark.parametrize(
21 |       ("param1", "param2"),
22 | /     (
23 | |         [1, 2],
24 | |         [3, 4],
25 | |     ),
   | |_____^
26 |   )
27 |   def test_tuple_of_lists(param1, param2):
   |
help: Use `list` of `list` for parameter values
   |
21 |     ("param1", "param2"),
   -     (
22 +     [
23 |         [1, 2],
24 |         [3, 4],
   -     ),
25 +     ],
26 | )
   |
note: This is an unsafe fix and may change runtime behavior

PT007 [*] Wrong values type in `pytest.mark.parametrize` expected `list` of `list`
  --> PT007.py:39:9
   |
37 |     ("param1", "param2"),
38 |     [
39 |         (1, 2),
   |         ^^^^^^
40 |         (3, 4),
41 |     ],
   |
help: Use `list` of `list` for parameter values
   |
38 |     [
   -         (1, 2),
39 +         [1, 2],
40 |         (3, 4),
   |
note: This is an unsafe fix and may change runtime behavior

PT007 [*] Wrong values type in `pytest.mark.parametrize` expected `list` of `list`
  --> PT007.py:40:9
   |
38 |     [
39 |         (1, 2),
40 |         (3, 4),
   |         ^^^^^^
41 |     ],
42 | )
   |
help: Use `list` of `list` for parameter values
   |
39 |         (1, 2),
   -         (3, 4),
40 +         [3, 4],
41 |     ],
   |
note: This is an unsafe fix and may change runtime behavior

PT007 [*] Wrong values type in `pytest.mark.parametrize` expected `list` of `list`
  --> PT007.py:81:38
   |
80 | @pytest.mark.parametrize("a", [1, 2])
81 | @pytest.mark.parametrize(("b", "c"), ((3, 4), (5, 6)))
   |                                      ^^^^^^^^^^^^^^^^
82 | @pytest.mark.parametrize("d", [3,])
83 | @pytest.mark.parametrize(
   |
help: Use `list` of `list` for parameter values
   |
80 | @pytest.mark.parametrize("a", [1, 2])
   - @pytest.mark.parametrize(("b", "c"), ((3, 4), (5, 6)))
81 + @pytest.mark.parametrize(("b", "c"), [(3, 4), (5, 6)])
82 | @pytest.mark.parametrize("d", [3,])
   |
note: This is an unsafe fix and may change runtime behavior

PT007 [*] Wrong values type in `pytest.mark.parametrize` expected `list` of `list`
  --> PT007.py:81:39
   |
80 | @pytest.mark.parametrize("a", [1, 2])
81 | @pytest.mark.parametrize(("b", "c"), ((3, 4), (5, 6)))
   |                                       ^^^^^^
82 | @pytest.mark.parametrize("d", [3,])
83 | @pytest.mark.parametrize(
   |
help: Use `list` of `list` for parameter values
   |
80 | @pytest.mark.parametrize("a", [1, 2])
   - @pytest.mark.parametrize(("b", "c"), ((3, 4), (5, 6)))
81 + @pytest.mark.parametrize(("b", "c"), ([3, 4], (5, 6)))
82 | @pytest.mark.parametrize("d", [3,])
   |
note: This is an unsafe fix and may change runtime behavior

PT007 [*] Wrong values type in `pytest.mark.parametrize` expected `list` of `list`
  --> PT007.py:81:47
   |
80 | @pytest.mark.parametrize("a", [1, 2])
81 | @pytest.mark.parametrize(("b", "c"), ((3, 4), (5, 6)))
   |                                               ^^^^^^
82 | @pytest.mark.parametrize("d", [3,])
83 | @pytest.mark.parametrize(
   |
help: Use `list` of `list` for parameter values
   |
80 | @pytest.mark.parametrize("a", [1, 2])
   - @pytest.mark.parametrize(("b", "c"), ((3, 4), (5, 6)))
81 + @pytest.mark.parametrize(("b", "c"), ((3, 4), [5, 6]))
82 | @pytest.mark.parametrize("d", [3,])
   |
note: This is an unsafe fix and may change runtime behavior
