Skip to content

Commit 464bee5

Browse files
author
Adam DePue
authored
Merge pull request #42 from jemiahlee/bugfix_lookuperror
Make EnumLookupError inherit from LookupError.
2 parents 075eaf0 + 36ebe55 commit 464bee5

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ nosetests.xml
3333
.mr.developer.cfg
3434
.project
3535
.pydevproject
36+
.ropeproject

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
1.2.1 (2016-09-16)
5+
------------------
6+
- ``EnumLookupError`` class now inherits from built-in ``LookupError``.
7+
48
1.2.0 (2016-04-15)
59
------------------
610
- added simple ``LookupError`` members that are thrown when

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name='richenum',
16-
version='1.2.0',
16+
version='1.2.1',
1717
description='Enum library for python.',
1818
long_description=(
1919
open('README.rst').read() + '\n\n' +

src/richenum/enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class EnumConstructionException(Exception):
2323
pass
2424

2525

26-
class EnumLookupError(Exception):
26+
class EnumLookupError(LookupError):
2727
"""
2828
Raised when an enum cannot be found by the specified method of lookup.
2929
"""
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
try:
2+
import unittest2 as unittest
3+
except ImportError:
4+
import unittest
5+
6+
from richenum import EnumLookupError # noqa
7+
8+
9+
class EnumLookupErrorTestSuite(unittest.TestCase):
10+
def test_enumlookuperror_is_lookuperror(self):
11+
self.assertTrue(issubclass(EnumLookupError, LookupError))

0 commit comments

Comments
 (0)