You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be a Numpy dependency in pytest.approx(), which detracts from the actual error. This is happening in diffusion-master and making the assertion error confusing.
When there is an AssertionError while using pytest.approx() it tries to use Numpy to represent the error, so we get the expected AssertionError followed by a ModuleNotFoundError:
> assert numerical_solution == pytest.approx(analytical_solution, abs=1e-2)
E AssertionError: assert [0, 0.6701936...01229794, ...] == approx([0 ± 1... 0 ± 1.0e-02])
E (pytest_assertion plugin: representation of details failed: /usr/local/Caskroom/miniconda/base/envs/diffusion/lib/python3.9/site-packages/_pytest/python_api.py:323: ModuleNotFoundError: No module named 'numpy'.
E Probably an object has a faulty __repr__.)
This makes it appear like we should include Numpy in the requirements. Strictly speaking, the test does not need Numpy, but the error message needs it to display properly.
We should include Numpy to reduce confusion.
The text was updated successfully, but these errors were encountered:
This looks to me like a bug in pytest. If Numpy is really a dependency for pytest, it should be installed when installing it. I'd suggest to report this to pytest developers in GitHub (or whatever they have their code).
There appears to be a Numpy dependency in
pytest.approx()
, which detracts from the actual error. This is happening indiffusion-master
and making the assertion error confusing.When there is an AssertionError while using
pytest.approx()
it tries to use Numpy to represent the error, so we get the expected AssertionError followed by a ModuleNotFoundError:This makes it appear like we should include Numpy in the requirements. Strictly speaking, the test does not need Numpy, but the error message needs it to display properly.
We should include Numpy to reduce confusion.
The text was updated successfully, but these errors were encountered: