bugfix: match_expected should raise ParamsError when comparator is not supported

This commit is contained in:
httprunner
2017-06-29 17:27:23 +08:00
parent bfa2227d10
commit 387e5beeab
2 changed files with 6 additions and 1 deletions

View File

@@ -210,6 +210,8 @@ def match_expected(value, expected, comparator="eq"):
assert value in expected
elif comparator in ["regex"]:
assert re.match(expected, value)
else:
raise ParamsError("comparator not supported!")
return True
except AssertionError: