CLN: Change assert_([not] isinstance(a,b)) to specialized forms

Work on #6175. Change superclass of tests/test_compat, to use tm.TestCase