ESSS / pytest-regressions

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

use `isinstance` instead of type #136

Closed 12rambau closed 1 year ago

12rambau commented 1 year ago

I am creating a class that inherit from pd.DataFrame. in short it creates qa specific dataframe from a specific type of data. The consequence is that in my test I cannot use the dataframe_regression because my type is pygaul.Names and not exactly pd.DataFrame. On the other hand if you were using isinstance it would work thanks to the inheritance process.

https://github.com/ESSS/pytest-regressions/blob/1bd9e7ba24f7054299d4b335b92e79c38a568cf9/src/pytest_regressions/dataframe_regression.py#L239C39-L239C39

If this is a wanted feature, I'd be happy to make a PR