Skip to content

Add alias for parametrize or provide better error reporting #463

@pytestbot

Description

@pytestbot

Originally reported by: Nenad Ognjanovic (BitBucket: bgr_, GitHub: bgr_)


Consider adding an alias parameterize for parametrize, since it's a valid spelling but using it in pytest will give a misleading error message - for the code below error message will say "fixture 'arg' not found", not mentioning that parameterize doesn't exist.

#!python

import pytest

@pytest.mark.parameterize('arg, expected', [
    (1, 1),
])
def test_confusion(arg, expected):
    assert arg == expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions