Skip to content

Instantly share code, notes, and snippets.

@Kalimaha
Created May 19, 2017 00:40
Show Gist options
  • Select an option

  • Save Kalimaha/91366d4eda1aeed2e69829c19b296e6a to your computer and use it in GitHub Desktop.

Select an option

Save Kalimaha/91366d4eda1aeed2e69829c19b296e6a to your computer and use it in GitHub Desktop.
Local PyTest Plugin
import pytest
from pytest_pact.utils.pytest_utils import read_marker
@pytest.hookimpl(hookwrapper=True)
def pytest_pyfunc_call(pyfuncitem):
state = read_marker(pyfuncitem, 'state')
print(state)
outcome = yield
res = outcome.get_result()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment