From 5cd6c9a939b060946e1b38e2c2597a5bbac82024 Mon Sep 17 00:00:00 2001 From: Miikka Koistinen Date: Fri, 27 Jul 2018 16:53:51 +0300 Subject: 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 --- yardstick/common/exceptions.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'yardstick/common') 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' -- cgit 1.2.3-korg