mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-20 23:59:49 +08:00
bugfix: match_expected should raise ParamsError when comparator is not supported
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user