Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parametrize fails on null string in 8.0.dev #11563

Closed
pllim opened this issue Oct 27, 2023 · 0 comments · Fixed by #11564
Closed

parametrize fails on null string in 8.0.dev #11563

pllim opened this issue Oct 27, 2023 · 0 comments · Fixed by #11564
Labels
type: regression indicates a problem that was introduced in a release which was working previously

Comments

@pllim
Copy link
Contributor

pllim commented Oct 27, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression indicates a problem that was introduced in a release which was working previously
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants