(self, row_str)
| 220 | self.table_len.append(len(head)) |
| 221 | |
| 222 | def add_row(self, row_str): |
| 223 | if not isinstance(row_str, list): |
| 224 | print('The row_str should be a list') |
| 225 | if len(row_str) != self.col_num: |
| 226 | print( |
| 227 | f'The length of row data should be equal the length of table heads, but the data: {len(row_str)} is not equal table heads {self.col_num}' |
| 228 | ) |
| 229 | for i in range(self.col_num): |
| 230 | if len(str(row_str[i])) > self.table_len[i]: |
| 231 | self.table_len[i] = len(str(row_str[i])) |
| 232 | self.data.append(row_str) |
| 233 | |
| 234 | def print_row(self, row): |
| 235 | string = '' |
no test coverage detected