Skip to content

Commit f6b121d

Browse files
author
Sylvain MARIE
committed
Updated test to match stack overflow answer
1 parent f220f6e commit f6b121d

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

pytest_cases/tests/fixtures/test_so.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ def lower(request):
88
return "i" * request.param
99

1010

11+
# @pytest_fixture_plus(params=[1, 2])
12+
# def upper(request):
13+
# return "I" * request.param
14+
1115
@pytest.fixture(params=[1, 2])
1216
def upper(request):
13-
# this fixture does not use pytest_fixture_plus so we have to explicitly discard the 'not used' cases
17+
# Just for the remark: this fixture does not use pytest_fixture_plus
18+
# so we have to explicitly discard the 'NOT_USED' cases
1419
if request.param is not NOT_USED:
1520
return "I" * request.param
1621

@@ -20,3 +25,13 @@ def upper(request):
2025

2126
def test_all(all):
2227
print(all)
28+
29+
30+
def test_synthesis(module_results_dct):
31+
"""Use pytest-harvest to check that the list of executed tests is correct """
32+
33+
assert list(module_results_dct) == ['test_all[lower-1]',
34+
'test_all[lower-2]',
35+
'test_all[lower-3]',
36+
'test_all[upper-1]',
37+
'test_all[upper-2]']

0 commit comments

Comments
 (0)