pytest_cases/case_funcs_new.py
def case(id=None,             # type: str  # noqa
         tags=None,           # type: Union[Any, Iterable[Any]]
         marks=(),            # type: Union[MarkDecorator, Iterable[MarkDecorator]]
         case_func=DECORATED  # noqa
         ):
    """
    Optional decorator for case functions so as to customize some information.

    ```python
    @case(id='hey')
    def case_hi():
        return 1
    ```

    :param id: the custom pytest id that should be used when this case is active. Replaces the deprecated `@case_name`
        decorator from v1. If no id is provided, the id is generated from case functions by removing their prefix,
        see `@parametrize_with_cases(prefix='case_')`.
    :param tags: custom tags to be used for filtering in `@parametrize_with_cases(has_tags)`. Replaces the deprecated
        `@case_tags` and `@target` decorators.
    :param marks: optional pytest marks to add on the case. Note that decorating the function directly with the mark
        also works, and if marks are provided in both places they are merged.
    :return:
    """
    case_info = CaseInfo(id, marks, tags)
    case_info.attach_to(case_func)
    return case_func

    Optional decorator for case functions so as to customize some information.

    ```python
    @case(id='hey')
    def case_hi():
        return 1
    ```

    :param id: the custom pytest id that should be used when this case is active. Replaces the deprecated `@case_name`
        decorator from v1. If no id is provided, the id is generated from case functions by removing their prefix,
        see `@parametrize_with_cases(prefix='case_')`.
    :param tags: custom tags to be used for filtering in `@parametrize_with_cases(has_tags)`. Replaces the deprecated
        `@case_tags` and `@target` decorators.
    :param marks: optional pytest marks to add on the case. Note that decorating the function directly with the mark
        also works, and if marks are provided in both places they are merged.
    :return:
    
Optional decorator for case functions so as to customize some information.
Optional decorator for case functions so as to customize some information .
def case(id=None,             
         tags=None,           
         marks=(),            
         case_func=DECORATED  
         ):
    case_info = CaseInfo(id, marks, tags)
    case_info.attach_to(case_func)
    return case_func
def case ( id = None , tags = None , marks = ( ) , case_func = DECORATED ) : case_info = CaseInfo ( id , marks , tags ) case_info . attach_to ( case_func ) return case_func
Optional decorator for case functions so as to customize some information.
Optional decorator for case functions so as to customize some information .
# type: str  # noqa # type: Union[Any, Iterable[Any]] # type: Union[MarkDecorator, Iterable[MarkDecorator]] # noqa """
    Optional decorator for case functions so as to customize some information.

    ```python
    @case(id='hey')
    def case_hi():
        return 1
    ```

    :param id: the custom pytest id that should be used when this case is active. Replaces the deprecated `@case_name`
        decorator from v1. If no id is provided, the id is generated from case functions by removing their prefix,
        see `@parametrize_with_cases(prefix='case_')`.
    :param tags: custom tags to be used for filtering in `@parametrize_with_cases(has_tags)`. Replaces the deprecated
        `@case_tags` and `@target` decorators.
    :param marks: optional pytest marks to add on the case. Note that decorating the function directly with the mark
        also works, and if marks are provided in both places they are merged.
    :return:
    """
None
id
the custom pytest id that should be used when this case is active. Replaces the deprecated `@case_name`
decorator from v1. If no id is provided, the id is generated from case functions by removing their prefix,
see `@parametrize_with_cases(prefix='case_')`.
the custom pytest id that should be used when this case is active . Replaces the deprecated ` @case_name ` decorator from v1 . If no id is provided the id is generated from case functions by removing their prefix see ` @parametrize_with_cases ( prefix = ' case_ ' ) ` .
tags
custom tags to be used for filtering in `@parametrize_with_cases(has_tags)`. Replaces the deprecated
`@case_tags` and `@target` decorators.
custom tags to be used for filtering in ` @parametrize_with_cases ( has_tags ) ` . Replaces the deprecated ` @case_tags ` and ` @target ` decorators .
marks
optional pytest marks to add on the case. Note that decorating the function directly with the mark
also works, and if marks are provided in both places they are merged.
optional pytest marks to add on the case . Note that decorating the function directly with the mark also works and if marks are provided in both places they are merged .
case_func