def test_subclass(self): res = t.Subclass(type) self.assertEqual(repr(res), '<Subclass(type)>') c = t.Subclass[type] class Type(type): pass res = c.check(Type) self.assertEqual(res, Type) res = extract_error(c, object) self.assertEqual(res, 'value is not subclass of type')
def test_repr(self): res = t.Subclass(type) assert repr(res) == '<Subclass(type)>'