check_result
Define check result class.
CheckResult
Represent the result of running a check.
Source code in gatorgrade/output/check_result.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
__init__(passed, description, json_info, path=None, diagnostic='No diagnostic message available')
Construct a CheckResult.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
passed |
bool
|
The passed or failed status of the check result. If true, indicates that the check has passed. |
required |
description |
str
|
The description to use in output. |
required |
json_info |
the overall information to be included in json output |
required | |
diagnostic |
str
|
The message to use in output if the check has failed. |
'No diagnostic message available'
|
Source code in gatorgrade/output/check_result.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
__str__(show_diagnostic=False)
Print check's passed or failed status, description, and, optionally, diagnostic message.
If no diagnostic message is available, then the output will say so.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
show_diagnostic |
bool
|
If true, show the diagnostic message if the check has failed. Defaults to false. |
False
|
Source code in gatorgrade/output/check_result.py
48 49 50 51 52 53 54 55 56 57 58 |
|
display_result(show_diagnostic=False)
Print check's passed or failed status, description, and, optionally, diagnostic message.
If no diagnostic message is available, then the output will say so.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
show_diagnostic |
bool
|
If true, show the diagnostic message if the check has failed. Defaults to false. |
False
|
Source code in gatorgrade/output/check_result.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
print(show_diagnostic=False)
Print check's passed or failed status, description, and, optionally, diagnostic message.
If no diagnostic message is available, then the output will say so.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
show_diagnostic |
bool
|
If true, show the diagnostic message if the check has failed. Defaults to false. |
False
|
Source code in gatorgrade/output/check_result.py
60 61 62 63 64 65 66 67 68 69 70 |
|