File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
pytest_cases/tests/fixtures Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff 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 ])
1216def 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
2126def 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]' ]
You can’t perform that action at this time.
0 commit comments