Skip to content

Commit f6d36c0

Browse files
author
Sylvain MARIE
committed
Minor comments
1 parent 722cfc0 commit f6d36c0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pytest_cases/fixture_parametrize_plus.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
from .common_pytest_marks import has_pytest_param, get_param_argnames_as_list
2727
from .common_pytest_lazy_values import is_lazy_value, is_lazy, get_lazy_args
2828
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, get_marked_parameter_values, \
30-
resolve_ids
29+
extract_parameterset_info, ParameterSet, cart_product_pytest, mini_idval, inject_host, \
30+
get_marked_parameter_values, resolve_ids
3131

3232
from .fixture__creation import check_name_available, CHANGE, WARN
3333
from .fixture_core1_unions import InvalidParamsList, NOT_USED, UnionFixtureAlternative, _make_fixture_union, \
@@ -538,8 +538,11 @@ def _create_params_alt(fh, test_func_name, union_name, from_i, to_i, hook): # n
538538
argnames=argnames, argvalues_index=i, argvalues=argvals)
539539
# Finally copy the custom id/marks on the ParamAlternative if any
540540
if is_marked_parameter_value(marked_argvalues[i]):
541+
# TODO to support pytest 2 we should rather use our ParameterSet instead of pytest.param
541542
p_fix_alt = pytest.param(p_fix_alt, id=marked_argvalues[i].id, marks=marked_argvalues[i].marks)
542-
543+
# p_fix_alt = ParameterSet(values=(p_fix_alt,),
544+
# id=get_marked_parameter_id(marked_argvalues[i]),
545+
# marks=get_marked_parameter_marks(marked_argvalues[i]))
543546
else:
544547
# Create a unique fixture name
545548
p_fix_name = "%s_%s_is_P%stoP%s" % (test_func_name, param_names_str, from_i, to_i - 1)

0 commit comments

Comments
 (0)