Skip to content

fix: snapshot decorator for pytest fixtures #1743

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

Merged
merged 2 commits into from
Oct 22, 2020

Conversation

majorgreys
Copy link
Contributor

Description

In using snapshot decorator with pytest tests with fixtures, a TypeError error is raised. This is due to a known limitation of functools.wraps with Python 2.7 and pytest: pytest-dev/pytest#2782. This fix uses wrapt.decorator instead.

Checklist

  • Entry added to release notes using reno
  • Tests provided; and/or
  • Description of manual testing performed and explanation is included in the code and/or PR.
  • Library documentation is updated.
  • Corp site documentation is updated (link to the PR).

@majorgreys majorgreys requested a review from a team as a code owner October 22, 2020 18:11
@Kyle-Verhoog Kyle-Verhoog added the changelog/no-changelog A changelog entry is not required for this PR. label Oct 22, 2020
Kyle-Verhoog
Kyle-Verhoog previously approved these changes Oct 22, 2020
@Kyle-Verhoog Kyle-Verhoog merged commit 76d608b into master Oct 22, 2020
@Kyle-Verhoog Kyle-Verhoog deleted the majorgreys/snapshot-decorator branch October 22, 2020 20:04
Czechh added a commit that referenced this pull request Oct 23, 2020
…nvocations

* master:
  ci: introduce riot, use it to run tracer tests (#1737)
  fix(django): add check for instrument view mro (#1744)
  fix: snapshot decorator for pytest fixtures (#1743)
  tests(logging): don't test warn (#1738)
  feat(flask): store request headers (#1735)
  ci: fix deploy_master (#1739)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants