diff --git a/src/expfig/utils/get_pandas.py b/src/expfig/utils/get_pandas.py index 37a7f3c..d399172 100644 --- a/src/expfig/utils/get_pandas.py +++ b/src/expfig/utils/get_pandas.py @@ -1,5 +1,9 @@ class BadPandas: def __getattr__(self, item): + if item.startswith('__'): + # Alleviates pytest issue with self.__unwrapped__, see https://github.com/pytest-dev/pytest/issues/5080 + raise AttributeError(item) + raise ModuleNotFoundError("Optional dependency 'pandas' not installed. " "Install with 'pip install pandas' to utilize this functionality.")