added warning if test selector is not as expected
@@ -5,6 +5,7 @@ from yaml import load as yaml_load
from distutils.version import LooseVersion
import sklearn
from sklearn import __version__ as sklearn_version
+import warnings
def evaluate_cond(cond, v):
if cond.startswith(">="):
@@ -19,6 +20,7 @@ def evaluate_cond(cond, v):
return LooseVersion(v) < LooseVersion(cond[1:])
if cond.startswith(">"):
return LooseVersion(v) > LooseVersion(cond[1:])
+ warnings.warn('Test selection condition "{0}" should start with >=, <=, ==, !=, < or > to compare to version of scikit-learn run. The test will not be deselected'.format(cond))
return False
