aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common
diff options
context:
space:
mode:
authorMiikka Koistinen <miikka.koistinen@nokia.com>2018-07-27 16:53:51 +0300
committerMiikka Koistinen <miikka.koistinen@nokia.com>2018-07-31 11:58:19 +0300
commit5cd6c9a939b060946e1b38e2c2597a5bbac82024 (patch)
treee67c0b0aeceda494e7bb760b143775a6a2cbad40 /yardstick/common
parent8a52d114404a03b4adbb49ff7f221819502bf672 (diff)
Change assert statements to raises in CheckValue
* Instead of using assert statements, raise a custom exception. * Modify the unit tests so that they do not test unused parameters for equality. * Fix pylint and pep8 errors. JIRA: YARDSTICK-966 Change-Id: I41e13a5a22086827792eaf9de8da2e4ed6dd42de Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
Diffstat (limited to 'yardstick/common')
-rw-r--r--yardstick/common/exceptions.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yardstick/common/exceptions.py b/yardstick/common/exceptions.py
index 48f15c059..7e16e39ae 100644
--- a/yardstick/common/exceptions.py
+++ b/yardstick/common/exceptions.py
@@ -408,3 +408,7 @@ class AclUnknownActionTemplate(YardstickException):
class InvalidMacAddress(YardstickException):
message = 'Mac address "%(mac_address)s" is invalid'
+
+
+class ValueCheckError(YardstickException):
+ message = 'Constraint "%(value1)s %(operator)s %(value2)s" does not hold'