This commit is contained in:
Orgad Shaneh 2025-04-08 15:57:00 +03:00 committed by GitHub
commit 2a3aacf821
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -156,9 +156,10 @@ class BaseReport:
return f"{counts}/{self._report.collected_items} {'tests' if plural else 'test'} done."
def _hydrate_data(self, data, cells):
table_len = len(self._report.table_header)
for index, cell in enumerate(cells):
# extract column name and data if column is sortable
if "sortable" in self._report.table_header[index]:
if index < table_len and "sortable" in self._report.table_header[index]:
name_match = re.search(r"col-(\w+)", cell)
data_match = re.search(r"<td.*?>(.*?)</td>", cell)
if name_match and data_match: