COMPAT: 2.6 format spec compat

BUG: TestCase instances cant assertRaisesRegexp so use tm
Merge pull request #7153 from cpcloud/test-compat-2.6-7152

BUG/COMPAT: test compat on Python 2.6