Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

num_regression fixture now requires pandas to be installed #44

Closed
nicoddemus opened this issue Jan 7, 2021 · 3 comments
Closed

num_regression fixture now requires pandas to be installed #44

nicoddemus opened this issue Jan 7, 2021 · 3 comments

Comments

@nicoddemus
Copy link
Member

It seems that after #35, num_regression now also requires pandas, instead of just numpy as before.

With a virtual environment with just numpy and pytest-regression, this simple test fails:

def test(num_regression):
    num_regression.check([])
        try:
            import numpy as np
        except ModuleNotFoundError:
            raise ModuleNotFoundError(import_error_message("Numpy"))
        try:
            import pandas as pd
        except ModuleNotFoundError:
>           raise ModuleNotFoundError(import_error_message("Pandas"))
E           ModuleNotFoundError: 'Pandas' library is an optional dependency and must be installed explicitly when the fixture 'check' is used

.pr\lib\site-packages\pytest_regressions\num_regression.py:73: ModuleNotFoundError

Would it be possible to remove that requirement? cc @648trindade

@nicoddemus
Copy link
Member Author

Actually looking at the diff in #35, seems it was like this before.

cc @tadeu @carlosnewmar

@renefritze
Copy link
Contributor

How about install extras that add the right dependencies? So pip install pytest-regressions[numpy] would require numpy+pandas for example.

@nicoddemus
Copy link
Member Author

Sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants