Skip to content

Make deprecated_call() use monkey-patching again #1196

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
Nov 27, 2015

Conversation

nicoddemus
Copy link
Member

deprecated_call now uses monkey patching strategy to capture warnings

similar to what we had in 2.7, with a few enhancements

Fix #1190

cc @hunse

@@ -29,18 +29,39 @@ def pytest_namespace():


def deprecated_call(func, *args, **kwargs):
"""Assert that ``func(*args, **kwargs)`` triggers a DeprecationWarning.
""" assert that calling ``func(*args, **kwargs)`` triggers a
DeprecationWarning.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should say "DeprecationWarning or PendingDeprecationWarning".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, thanks

@hunse
Copy link
Contributor

hunse commented Nov 26, 2015

Looks good to me.

similar to what we had in 2.7, with a few enhancements

Fix pytest-dev#1190
RonnyPfannschmidt added a commit that referenced this pull request Nov 27, 2015
Make deprecated_call() use monkey-patching again , fixes #1190
@RonnyPfannschmidt RonnyPfannschmidt merged commit 604a021 into pytest-dev:master Nov 27, 2015
@nicoddemus nicoddemus deleted the deprecated-call-1190 branch November 27, 2015 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants