Skip to content

Being able to choose the default initial-sort column #521

Closed
@harmin-parra

Description

@harmin-parra

By default, the initial-sort css class is set to the Result column
<th class="sortable initial-sort result" col="result">Result</th>

Could we be able to change the initial sorted column ?
In my personal case, I prefer to have the sort applied to the Test column (col="name")

I do know we can achieve this by using the pytest_html_results_table_header hook.

But I think it would be easier and move convenient to be able to do this via a command-line option

Maybe by adding another group.addoption or parser.addini ?
which of these two is better ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions