|
26 | 26 | from .common_pytest_marks import has_pytest_param, get_param_argnames_as_list |
27 | 27 | from .common_pytest_lazy_values import is_lazy_value, is_lazy, get_lazy_args |
28 | 28 | from .common_pytest import get_fixture_name, remove_duplicates, mini_idvalset, is_marked_parameter_value, \ |
29 | | - extract_parameterset_info, ParameterSet, cart_product_pytest, mini_idval, inject_host |
| 29 | + extract_parameterset_info, ParameterSet, cart_product_pytest, mini_idval, inject_host, get_marked_parameter_values |
30 | 30 |
|
31 | 31 | from .fixture__creation import check_name_available, CHANGE, WARN |
32 | 32 | from .fixture_core1_unions import InvalidParamsList, NOT_USED, UnionFixtureAlternative, _make_fixture_union, \ |
@@ -698,6 +698,10 @@ def parametrize_plus_decorate(test_func, fixtures_dest): |
698 | 698 | fix_alt_names.append(a) |
699 | 699 | else: |
700 | 700 | # this should only happen when the alternative is directly a fixture reference |
| 701 | + if is_marked_parameter_value(alt): |
| 702 | + alt = get_marked_parameter_values(alt) |
| 703 | + assert len(alt) == 1, "Error with fixture reference, please report" |
| 704 | + alt = alt[0] |
701 | 705 | assert isinstance(alt, FixtureParamAlternative), \ |
702 | 706 | "Created fixture names are not unique, please report" |
703 | 707 |
|
|
0 commit comments