55
55
56
56
class CIMReportGenerator (object ):
57
57
"""
58
- Generate the Report
58
+ Generate the Report.
59
59
data format::
60
60
61
61
[
@@ -67,6 +67,9 @@ class CIMReportGenerator(object):
67
67
"status": "pass"/"fail"
68
68
}
69
69
]
70
+
71
+ Args:
72
+ data (list): List of dictionaries with specified format.
70
73
"""
71
74
72
75
def __init__ (self , data = [], report_class = MarkDownReport ):
@@ -78,7 +81,7 @@ def add_data(self, data):
78
81
adds data to object property.
79
82
80
83
Args:
81
- data(list): List of dictionaries with specified format.
84
+ data (list): List of dictionaries with specified format.
82
85
"""
83
86
self .data .append (data )
84
87
@@ -87,8 +90,8 @@ def _group_by(self, keys, data=None):
87
90
Function to generate group of data using Keys provided
88
91
89
92
Args:
90
- keys(list): Contains keys to group data by.
91
- data(list): list of dictionaries with specified format.
93
+ keys (list): Contains keys to group data by.
94
+ data (list): list of dictionaries with specified format.
92
95
93
96
Yields:
94
97
data_set.DataSet: data set object mapped with the tags
@@ -105,8 +108,8 @@ def _get_count_by(self, keys, data=None):
105
108
Function to generate count of data using Keys provided
106
109
107
110
Args:
108
- keys(list): Contains keys to generate count by.
109
- data(list): list of dictionaries with specified format.
111
+ keys (list): Contains keys to generate count by.
112
+ data (list): list of dictionaries with specified format.
110
113
111
114
Yields:
112
115
data_set.DataSet: data set object mapped with the tags
@@ -123,7 +126,7 @@ def pass_count(counter):
123
126
Function to Get count in Pass/Total format.
124
127
125
128
Args:
126
- counter(collections.Counter): Contains counts of passing/failing Testcases.
129
+ counter (collections.Counter): Contains counts of passing/failing Testcases.
127
130
128
131
Yields:
129
132
String: string with pass/total format.
@@ -139,7 +142,7 @@ def fail_count(counter):
139
142
Function to Get count in Fail/Total format.
140
143
141
144
Args:
142
- counter(collections.Counter): Contains counts of passing/failing Testcases.
145
+ counter (collections.Counter): Contains counts of passing/failing Testcases.
143
146
144
147
Yields:
145
148
String: string with fail/total format.
@@ -231,7 +234,9 @@ def generate_field_summary_table(self):
231
234
del field_summary_table
232
235
233
236
def generate_skip_tests_table (self ):
234
- """ """
237
+ """
238
+ Displays summary of the skipped tests
239
+ """
235
240
skipped_tests = list (filter (lambda d : d ["status" ] == "skipped" , self .data ))
236
241
if skipped_tests :
237
242
skipped_tests_table = MarkdownTable (
@@ -255,7 +260,7 @@ def generate_report(self, report_path):
255
260
Function to generate report from the stored data.
256
261
257
262
Args:
258
- report_path(string): Path to create the report.
263
+ report_path (string): Path to create the report.
259
264
"""
260
265
self .report_generator .set_title ("CIM AUDIT REPORT" )
261
266
self .data .sort (
0 commit comments