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

Support defaults via kwargs #43

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Jul 7, 2017

  1. Add defaults support to enable deprecation

    Add support for using declared keyword argument values from both
    hookspecs and hookimpls. The current logic will inspect the hookimpl
    and, if it contains defaults, values will be first looked up from the
    caller provided data and if not defined will be taken from the
    hookspec's declared defaults. If the spec does not define defaults
    the value is taken from the hookimpl's defaults as is expected under
    normal function call semantics.
    
    Resolves pytest-dev#15
    Tyler Goodlet committed Jul 7, 2017
    Configuration menu
    Copy the full SHA
    e143650 View commit details
    Browse the repository at this point in the history
  2. Add a defaults precedence test

    Verify that defaults declared in hook impls and specs adhere to the
    lookup order: call provided value, hook spec default, and finally
    falling back to the spec's default value.
    Tyler Goodlet committed Jul 7, 2017
    Configuration menu
    Copy the full SHA
    9fdd7f3 View commit details
    Browse the repository at this point in the history