Convert some equivalence tests in test_*.py to assertions

fixes #8393