Convert some equivalence tests in test_*.py to assertions

fixes #8393
Merge pull request #8394 from skirpichev/8393-tests

Convert some equivalence tests in test_*.py to assertions