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

Some of the thin/thick target test are not actually testing the code #76

Open
samaloney opened this issue Jul 13, 2022 · 2 comments
Open

Comments

@samaloney
Copy link
Collaborator

Describe the bug

Some of the test cases are missing assert statements e.g. np.allclose(a, b) instead of assert np.allclose(a, b) when enabled some of the tests fail.

To Reproduce

import sunpy

sunpy.map.Map(...)
etc

What happened?

No response

Expected behavior

No response

Screenshots

No response

System Details

No response

Installation method

No response

@samaloney
Copy link
Collaborator Author

So it seems the test was never actually asserting the comparisons even when I first added it 🤦 see this commit

373d0aa#diff-1320ad472d160b5a648de74b8da05100fe0985f4d25b0ee220722eb3b47ab532

and code

https://github.com/sunpy/sunxspex/blob/373d0aae312fdbce8d5eb0b807416bff5f917fdc/sunxspex/tests/test_brem.py#L124-L159

and fixing the test back in that commit it still doesn't pass

>       assert_allclose(res_thick, res_idl_thick, atol=0, rtol=1e-10)
E       AssertionError:
E       Not equal to tolerance rtol=1e-10, atol=0
E
E       x and y nan location mismatch:
E        x: array([2.251595e-30, 3.044370e-31, 3.728863e-34, 3.307037e-36,
E              1.212173e-37, 5.335296e-39, 1.642012e-40,          nan])
E        y: array([2.251596e-30, 3.044377e-31, 3.729762e-34, 3.324935e-36,
E              1.263982e-37, 6.961897e-39, 6.223255e-40, 1.162617e-40])

@samaloney
Copy link
Collaborator Author

The test_split_and_integrate function is currently skipped as it functionality was changed but we should add a new test which actually tests the current code.

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

1 participant