Tekvel Magic
Loading...
Searching...
No Matches
SclValidationResult Class Reference

SCL validation result. More...

Public Member Functions

def __init__ (self, validation_result_string)
 

Public Attributes

 valid
 True if SCL-validation passed successfully, False if SCL-file fails to validate. More...
 
 errors
 List of strings, containing validation errors if valid is False, or empty list otherwise. More...
 

Detailed Description

SCL validation result.

Wraps validation result returned by SCL.validate() into convinient object allowing to both rapidly access to boolean validation result as well as array of errors if validation fails.

Shortcut function TestEngine.log_validation_errors() can be used for logging of SCL-validation errors. See code snippet below for example usage.

scl = SCL("path/to/scl/file")
res = scl.validate()
if not res.valid:
TestEngine.log_validation_errors(res)
See also
TestEngine.log_validation_errors() SCL.validate()

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  validation_result_string 
)

Member Data Documentation

◆ errors

errors

List of strings, containing validation errors if valid is False, or empty list otherwise.

◆ valid

valid

True if SCL-validation passed successfully, False if SCL-file fails to validate.