Skip to content

Refactor pointer parametrization #4

Description

@salotz

I would like to propose a potentially breaking change to the pointer parametrization, however I don't want to just make the PR in case you would need to keep the old behavior.

First, I think the simplest case should be easier to write (and reflect what the current docs have in them), e.g.:

@pytest.mark.pointer(func)
def test_func(): ...

Instead of:

@pytest.mark.pointer(target=func)
def test_func(): ...

Second, I think to keep things clearer it would be good to refactor the property pointer to either a different mark e.g. pytest.mark.pointer_property(Class, 'property); or to use explicit keyword arguments pytest.marker.pointer(class=Class, property_name='property').

This would then allow a single marker to point to multiple functions via multiple positional arguments (although I don't really see that being that important).

Let me know what you think.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions