Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pytest_html/basereport.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@ def _run_count(self):
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:
Expand Down