Skip to content

parametrize fails on null string in 8.0.dev #11563

@pllim

Description

@pllim

This was originally reported at #11489 (comment) but was asked to open a new issue for it. Also see:

Caused by:

if id[-1].isdigit():

To reproduce the failure, create a test using parametrize marker and include empty string as one of the parametrize inputs. Example traceback:

_ ERROR collecting astropy/time/tests/test_mask.py _
...
_pytest/python.py:1338: in parametrize
    ids = self._resolve_parameter_set_ids(
_pytest/python.py:1461: in _resolve_parameter_set_ids
    return id_maker.make_unique_parameterset_ids()
_pytest/python.py:1006: in make_unique_parameterset_ids
    if id[-1].isdigit():
E   IndexError: string index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions