ESSS / pytest-regressions

Pytest plugin for regression testing: https://pytest-regressions.readthedocs.io
MIT License
179 stars 35 forks source link

file_regression check method don't accept Pathlib.Path #151

Closed 12rambau closed 10 months ago

12rambau commented 10 months ago

I wanted to use the pytest-regressions lib to check GEE generated .pkl files but it seems the check method only accept str. As pathlib.Path offers lots of flexibility and cross-platform solution to file management issues, I'm using it systematically and I thing it an acceptable input for a file checking method.

Is it a wanted feature ?

nicoddemus commented 10 months ago

Hi @12rambau,

Yes definitely, this is something we have adopted in general but probably missed that when developing this plugin (probably because it is relatively old code).

Would love to review/merge a PR which fixed this. 👍

12rambau commented 10 months ago

wait let me check with you, I was working a PR and I think I realized I was not using the method properly. The content parameter should be the byte or str content of the file not the file path right ?

If it's the case then I should close this issue as there is no issue here, just a misunderstanding.

nicoddemus commented 10 months ago

The content parameter should be the byte or str content of the file not the file path right ?

Yes.

Perhaps we can improve the documentation to make that clearer?