File tree Expand file tree Collapse file tree 3 files changed +48
-0
lines changed
allure-pytest/test/metafunc Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ def pytest_generate_tests (metafunc ):
3+
4+ if 'metafunc_param' in metafunc .fixturenames :
5+ metafunc .parametrize ("metafunc_param" , [True ])
6+ elif 'metafunc_param_with_ids' in metafunc .fixturenames :
7+ metafunc .parametrize ("metafunc_param_with_ids" , [True ], ids = ['metafunc_param_id' ])
8+
Original file line number Diff line number Diff line change 1+ """
2+ >>> allure_report = getfixture('allure_report')
3+
4+ >>> assert_that(allure_report,
5+ ... all_of(
6+ ... has_property('test_cases', has_length(2)),
7+ ... has_property('test_groups', has_length(0))
8+ ... ))
9+ """
10+
11+
12+ def test_metafunc_param (metafunc_param ):
13+ """
14+ >>> allure_report = getfixture('allure_report')
15+ >>> assert_that(allure_report,
16+ ... has_test_case('test_metafunc_param[True]',
17+ ... has_parameter('metafunc_param', True)
18+ ... )
19+ ... )
20+ """
21+ assert metafunc_param
22+
23+
24+ def test_metafunc_param_with_ids (metafunc_param_with_ids ):
25+ """
26+ >>> allure_report = getfixture('allure_report')
27+
28+ >>> assert_that(allure_report,
29+ ... has_test_case('test_metafunc_param_with_ids[metafunc_param_id]',
30+ ... has_parameter('metafunc_param_id', True)
31+ ... )
32+ ... ) # doctest: +SKIP
33+
34+ >>> assert_that(allure_report,
35+ ... has_test_case('test_metafunc_param_with_ids[metafunc_param_id]',
36+ ... has_parameter('metafunc_param_with_ids', True)
37+ ... )
38+ ... )
39+ """
40+ assert metafunc_param_with_ids
You can’t perform that action at this time.
0 commit comments