diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2014-10-14 15:59:14 (GMT) |
---|---|---|
committer | Ethan Furman <ethan@stoneleaf.us> | 2014-10-14 15:59:14 (GMT) |
commit | 987f3dd161c4390d5e458298b93f73fdb984ad6c (patch) | |
tree | f5dac844e62e32cf70afbb2b4c549d12c2f08c45 /Lib/test | |
parent | 395c73436e279f53930ce66d682600d327f4e3c8 (diff) | |
parent | 0ae550bdde7cc87defb89dd19c912bf4485619f5 (diff) | |
download | cpython-987f3dd161c4390d5e458298b93f73fdb984ad6c.zip cpython-987f3dd161c4390d5e458298b93f73fdb984ad6c.tar.gz cpython-987f3dd161c4390d5e458298b93f73fdb984ad6c.tar.bz2 |
Issue22506: merge from 3.4
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_enum.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index bf9d633..7d172c8 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -176,6 +176,18 @@ class TestEnum(unittest.TestCase): set(['__class__', '__doc__', '__module__', 'name', 'value', 'wowser']), ) + def test_dir_on_sub_with_behavior_on_super(self): + # see issue22506 + class SuperEnum(Enum): + def invisible(self): + return "did you see me?" + class SubEnum(SuperEnum): + sample = 5 + self.assertEqual( + set(dir(SubEnum.sample)), + set(['__class__', '__doc__', '__module__', 'name', 'value', 'invisible']), + ) + def test_enum_in_enum_out(self): Season = self.Season self.assertIs(Season(Season.WINTER), Season.WINTER) |