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

Test outputs are not being correctly verified #40

Closed
larrybradley opened this issue Sep 19, 2023 · 7 comments
Closed

Test outputs are not being correctly verified #40

larrybradley opened this issue Sep 19, 2023 · 7 comments
Labels

Comments

@larrybradley
Copy link
Member

As an example, I removed a test output file and deliberately changed some values in some output files.
The resulting tests should fail, but they do not: astropy/regions#515

@moux233
Copy link

moux233 commented Nov 15, 2023

Hi
Same for me
Related to pytest 7 and new warning:
PytestReturnNotNoneWarning: Expected None, but mypackage/tests/test_sensors.py::TestFilters::test_embeddedfilter1 returned array([[ myarray ]]), which will be an error in a future version of pytest. Did you mean to use assert instead of return?
Reverting to pytest 6

@pllim pllim added the bug label Nov 15, 2023
@pllim
Copy link
Member

pllim commented Nov 15, 2023

I am guessing you were not using a dev version of pytest-arraydiff? I just released v0.6.0 . Can you please upgrade and see if it works now?

@moux233
Copy link

moux233 commented Nov 16, 2023

Thank you. Indeed I was using pytest-arraydiff 0.5.0.
I tested pytest-arraydiff 0.6.0 with pytest 7.4.3 this morning, it works perfectly fine. I tested both reference generation and checking.

@pllim
Copy link
Member

pllim commented Nov 16, 2023

@larrybradley 's current problem is specifically with tox not able to find the reference directory.

@moux233
Copy link

moux233 commented Nov 16, 2023

hmm sounds familiar
my suggestion would be to check the setup.cfg data:

[options.package_data]

  • = tests/reference/*

@larrybradley
Copy link
Member Author

@moux233 That was my initial thought too, but the reference data are being packaged.
https://github.com/astropy/regions/blob/main/pyproject.toml#L81

@larrybradley
Copy link
Member Author

I fixed the issue -- there was a typo in pyproject.toml package-data. 🤦 Sorry for the noise.

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

No branches or pull requests

3 participants