def test_raises_type_error(self, type_spec): with self.assertRaises(TypeError): type_analysis.check_all_abstract_types_are_bound(type_spec)
def test_does_not_raise_type_error(self, type_spec): try: type_analysis.check_all_abstract_types_are_bound(type_spec) except TypeError: self.fail('Raised TypeError unexpectedly.')