Skip to content

Commit a89255d

Browse files
committed
add pytest.param in test
1 parent 43e53a6 commit a89255d

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

tests/unit/test_statistics.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,12 @@
66
@pytest.mark.parametrize(
77
('attempts', 'expected_errors'),
88
[
9-
([1], {0: 1}),
10-
([1, 5], {0: 1, 4: 1}),
11-
([5, 1], {0: 1, 4: 1}),
12-
([3, 5, 1], {0: 1, 2: 1, 4: 1}),
13-
([1, 5, 3], {0: 1, 2: 1, 4: 1}),
14-
([2, 1, 2, 1, 5, 2, 1], {0: 3, 1: 3, 4: 1}),
15-
],
16-
ids=[
17-
'single_error',
18-
'two_single_errors',
19-
'two_single_errors_reversed',
20-
'three_single_errors',
21-
'three_single_errors_reordered',
22-
'multiple_errors_per_attempt',
9+
pytest.param([1], {0: 1}, id='single error'),
10+
pytest.param([1, 5], {0: 1, 4: 1}, id='two single errors'),
11+
pytest.param([5, 1], {0: 1, 4: 1}, id='two single errors reversed'),
12+
pytest.param([3, 5, 1], {0: 1, 2: 1, 4: 1}, id='three single errors'),
13+
pytest.param([1, 5, 3], {0: 1, 2: 1, 4: 1}, id='three single errors reordered'),
14+
pytest.param([2, 1, 2, 1, 5, 2, 1], {0: 3, 1: 3, 4: 1}, id='multiple errors per attempt'),
2315
],
2416
)
2517
def test_add_rate_limit_error(attempts: list[int], expected_errors: list[int]) -> None:

0 commit comments

Comments
 (0)