The builtin `property` is not a callable, so was failing the check in
`_test_simple_enum` causing a match failure; this adds `property` to the
bypass list.
Co-authored-by: Alexandru Mărășteanu <alexei@users.noreply.github.com>
else:
checked_value = checked_dict[key]
simple_value = simple_dict[key]
- if callable(checked_value):
+ if callable(checked_value) or isinstance(checked_value, bltns.property):
continue
if key == '__doc__':
# remove all spaces/tabs
CYAN = 1
MAGENTA = 2
YELLOW = 3
+ @bltns.property
+ def zeroth(self):
+ return 'zeroed %s' % self.name
class CheckedColor(Enum):
CYAN = 1
MAGENTA = 2
YELLOW = 3
+ @bltns.property
+ def zeroth(self):
+ return 'zeroed %s' % self.name
self.assertTrue(_test_simple_enum(CheckedColor, SimpleColor) is None)
SimpleColor.MAGENTA._value_ = 9
self.assertRaisesRegex(