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
Remove needless functions from an io.ascii
test helper file
#15782
Comments
Looks like @taldcroft added these a long time ago. Are other |
Fine by me. I would expect there was a reason for these functions in the days of yore, but I don't see a reason now. |
Can i solve this issue? (i am a beginner so i will try) |
@Rohit-Pujari , thank you for your interest! There is no need to ask for permission. But please do read through https://docs.astropy.org/en/latest/index_dev.html if you are new. |
i have raised the pull request,please inform me what i have did wrong |
Hi is this issue still open to resolve !!?? |
replaced all calls of: assert_equal() -> np.testing.assert_equal() assert_almost_equal() -> np.testing.assert_allclose() assert_true(a) -> assert a in the following files: astropy/io/ascii/tests/test_c_reader.py astropy/io/ascii/tests/test_cds.py astropy/io/ascii/tests/test_rst.py astropy/io/ascii/tests/test_types.py astropy/io/ascii/tests/test_read.py astropy/io/ascii/tests/test_fixedwidth.py astropy/io/ascii/tests/test_cds_header_from_readme.py
What is the problem this feature will solve?
A helper file in
io.ascii
tests contains three functions that serve little purpose:astropy/astropy/io/ascii/tests/common.py
Lines 27 to 37 in fefe226
Describe the desired outcome
The aforementioned functions should be removed and any tests still using them should be updated accordingly. Pull requests targeting one or more functions are welcome.
Additional context
assert_equal()
andassert_true()
should be inlined, butassert_almost_equal(a, b)
should be replaced withnp.testing.assert_allclose(a, b)
instead ofassert np.allclose(a, b)
because the dedicated testing function produces a better error message if the check fails.Performed removals
assert_equal()
assert_almost_equal()
assert_true()
The text was updated successfully, but these errors were encountered: