Skip to content

Commit

Permalink
Add regression tests for Enum.name and .value inference
Browse files Browse the repository at this point in the history
  • Loading branch information
nelfin committed Jun 10, 2021
1 parent 90d8a90 commit e50b5bb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/functional/e/enum_subclasses.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# pylint: disable=missing-docstring
from enum import Enum, IntEnum


class Issue1932(IntEnum):
"""https://github.com/PyCQA/pylint/issues/1932"""
FOO = 1

def whats_my_name(self):
return self.name.lower()


class Issue2062(Enum):
"""https://github.com/PyCQA/pylint/issues/2062"""
FOO = 1
BAR = 2

def __str__(self):
return self.name.lower()

0 comments on commit e50b5bb

Please sign in to comment.