Skip to content

API needlessly verbose? #5

Open
@smheidrich

Description

@smheidrich

Pretty useful package, but I'm wondering what is accomplished by having all these decorators that define the public API as class methods of Parametrization instead of regular functions. Wouldn't it be more ergonomic if it was e.g. just

from parametrization import case, autodetect parameters

@autodetect_parameters()
@case("my test case", something=1, expected="hello")
def test_whatever(something, expected):
    ...

?

I understand that Parametrization objects are needed internally to make things work, but don't see the point in exposing that to the user.

Adding the decorators as regular functions could of course be done in a completely backwards-compatible manner by keeping the class methods around.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions