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

python: unify code to generate ID from value #9678

Merged
merged 1 commit into from Feb 15, 2022

Commits on Feb 12, 2022

  1. python: unify code to generate ID from value

    In the following
    
        @pytest.mark.parametrize(..., ids=[val])
    
    the ID values are only allowed to be `str`, `float`, `int` or `bool`.
    
    In the following
    
        @pytest.mark.parametrize(..., [val])
    
        @pytest.mark.parametrize(..., [pytest.param(..., id=val])
    
    a different code path is used, which also allows `bytes`, `complex`,
    `re.Pattern`, `Enum` and anything with a `__name__`.
    
    In the interest of consistency, use the latter code path for all cases.
    bluetech committed Feb 12, 2022
    Copy the full SHA
    c3aa464 View commit details
    Browse the repository at this point in the history