nicoulaj / pytest-csv

CSV reporter for pytest.
GNU General Public License v3.0
21 stars 16 forks source link

results.cvs row order not the same as what `pytest --co` returns for xdist #22

Open etse1288 opened 2 years ago

etse1288 commented 2 years ago

Hi All, I have noticed that if I am using pytest with xdist the resulting CSV file will not have the same order as what pytest --co would return. I would like to confirm that this is indeed something not implemented/supported, before I go spend some time making it work. Thanks!

nicoulaj commented 2 years ago

When using xdist test results are appended as they come, so order is not predictable. We could add an option to generate sorted output.

inghowe83 commented 2 years ago

@nicoulaj we have create a solutions for this. @etse1288 and I will request a merge for this feature. Please help review, the output will be sorted based 'id' from the column as this is the only section where we can match the input --co data with the output. @nicoulaj Can you review and approve the merge request if it full-fill the requirement? Thanks

inghowe83 commented 2 years ago

@nicoulaj , we added xdist sort option. When this option is enable, it will sort the output of the csv

https://github.com/nicoulaj/pytest-csv/pull/23