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
{{ message }}
Repository navigation
Remove needless functions from an io.ascii test helper file #15782
# Compatibility functions to convert from nose to pytest
defassert_equal(a, b):
asserta==b
defassert_almost_equal(a, b, **kwargs):
assertnp.allclose(a, b, **kwargs)
defassert_true(a):
asserta
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.
Potential contributors can have a look at #16644 that removed the helper functions from one file and use that as an example.
Additional context
assert_equal() and assert_true() should be inlined, but assert_almost_equal(a, b) should be replaced with np.testing.assert_allclose(a, b) instead of assert np.allclose(a, b) because the dedicated testing function produces a better error message if the check fails.
Activity
pllim commentedon Dec 22, 2023
Looks like @taldcroft added these a long time ago. Are other
io.asciimaintainers on board with this? I don't see any link to previous discussions.taldcroft commentedon Dec 23, 2023
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.
Rohit-Pujari commentedon Dec 23, 2023
pllim commentedon Dec 23, 2023
Rohit-Pujari commentedon Dec 23, 2023
vagish-yadav commentedon Jan 14, 2024
eerovaher commentedon Jul 1, 2024
I re-added the
good first issuelabel because now there is an example pull request potential contributors can follow: #16644.