Skip to content

Commit

Permalink
pytest fix
Browse files Browse the repository at this point in the history
  • Loading branch information
avishaihalev authored and ahalev committed Mar 19, 2024
1 parent 8d53038 commit 650dcbb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/expfig/utils/get_pandas.py
Original file line number Diff line number Diff line change
@@ -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.")

Expand Down

0 comments on commit 650dcbb

Please sign in to comment.