Close #22756: Improve the test output for some assertEqual tests.

These tests were undebuggable as written, and there's no testing fallacy
involved in using the method we're testing to test the output of that method,
so switch to that.
Close #7559: ImportError when loading a test now shown as ImportError.

Previously the ImportError was only shown if the top level containing
package failed to import, with other ImportErrors showing up as
AttributeError - hiding the real cause. As part of this,
`TestLoader.loadTestsFromNames` now captures errors to self.errors.