Skip to content

Commit

Permalink
Add compatproperty deprecation warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmundar authored and nicoddemus committed Nov 27, 2016
1 parent 4837542 commit b38fad4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _pytest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ def __getattr__(self, name):

def compatproperty(name):
def fget(self):
# deprecated - use pytest.name
import warnings
warnings.warn("compatproperty is deprecated. Use pytest.name",
PendingDeprecationWarning, stacklevel=2)
return getattr(pytest, name)

return property(fget)
Expand Down

0 comments on commit b38fad4

Please sign in to comment.