Add compatproperty deprecation warning.

This commit is contained in:
nmundar 2016-11-26 12:22:58 +01:00 committed by Bruno Oliveira
parent 483754216f
commit b38fad4b82
1 changed files with 3 additions and 1 deletions

View File

@ -190,7 +190,9 @@ class FSHookProxy:
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)