Remove return values for asserts
Unless they are context managers.

- [X] closes #25135 
- [X] tests added / passed (not applicable)
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
