Add tests for equivalence. Fix quality errors.
Pylint changes.