Repository: ESSS/pytest-regressions (language: python)

Issue:
use `isinstance` instead of type
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


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 0f2a08f..5a4fdc5 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,7 +1,7 @@
 UNRELEASED
 ----------
 
-
+* `#137 <https://github.com/ESSS/pytest-regressions/pull/137>`__: (Bugfix) Make ``dataframe_regression`` compatible with classes inheriting from ``pandas.DataFrame``.
 
 2.4.2 (2023-01-12)
 ------------------


Test patch:
diff --git a/src/pytest_regressions/dataframe_regression.py b/src/pytest_regressions/dataframe_regression.py
index 5142b3b..adcba3c 100644
--- a/src/pytest_regressions/dataframe_regression.py
+++ b/src/pytest_regressions/dataframe_regression.py
@@ -236,7 +236,7 @@ def check(
 
         __tracebackhide__ = True
 
-        assert type(data_frame) is pd.DataFrame, (
+        assert isinstance(data_frame, pd.DataFrame), (
             "Only pandas DataFrames are supported on dataframe_regression fixture.\n"
             "Object with type '%s' was given." % (str(type(data_frame)),)
         )