You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tests, i get the following error, same as in issue #782
INTERNALERROR> if "sortable" in self._report.table_header[index]:
INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
INTERNALERROR> IndexError: list index out of range
The sample code is take verbatim from the documentation
When investingating the error and adding logging to the hook, i can see that it is called twice during the same test.
When inspecting the values of cells and cells and self._report.table_header in basereport.py in _hydrate_data, I see that the length of cells is 8 when self._report.table_header is 6. as the code is iterating on cells, this triggers an index error.
I found the answer, it was a weird bug due to the pwd of the working directory and the windows directory names.
Pytest was registering two conftests.py that were located in the same directory, but under two different paths, One with the windows path and one with the pwd that used the path with a different name:
PLUGIN registered: <module 'conftest' from 'C:\\Tests\\conftest.py'>
PLUGIN registered: <module 'conftest' from 'C:\\tests\\conftest.py'>
changing the path to the default windows one fixed the issue.
Closing the issue.
When running tests, i get the following error, same as in issue #782
The sample code is take verbatim from the documentation
When investingating the error and adding logging to the hook, i can see that it is called twice during the same test.
When inspecting the values of cells and
cells
andself._report.table_header
in basereport.py in_hydrate_data
, I see that the length ofcells
is 8 whenself._report.table_header
is 6. as the code is iterating on cells, this triggers an index error.Has this ever happened to anyone else ?
here is the sample code
Here is the result of the
print(cells)
statementprinting the content of
report.call
when filtering on report.when == "call" also gives 'setup' twice and then 'call' twiceThe text was updated successfully, but these errors were encountered: