[V2,1/5] framework/exception: add new exception VerifySkip

Message ID 20210318092215.27270-2-haiyangx.zhao@intel.com (mailing list archive)
State Changes Requested
Headers
Series framework: add a proposal of recognizing pkgs |

Commit Message

Zhao, HaiyangX March 18, 2021, 9:22 a.m. UTC
  this new type exeption is used for framework to handle
the cases which should be skipped.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 framework/exception.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)
  

Patch

diff --git a/framework/exception.py b/framework/exception.py
index cc2f724b..bdedd743 100644
--- a/framework/exception.py
+++ b/framework/exception.py
@@ -35,6 +35,19 @@  class VerifyFailure(Exception):
         return repr(self.value)
 
 
+class VerifySkip(Exception):
+
+    """
+    To be used within the test cases to verify if case should be skipped.
+    """
+
+    def __init__(self, value):
+        self.value = value
+
+    def __str__(self):
+        return repr(self.value)
+
+
 class SSHConnectionException(Exception):
 
     """