Skip to content

Commit

Permalink
100% branch coverage for 'zope.interface.declarations'.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Dec 8, 2014
1 parent d5a3d15 commit b12b0bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/zope/interface/declarations.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ def __add__(self, other):
seen = {}
result = []
for i in self.interfaces():
if i not in seen:
seen[i] = 1
result.append(i)
seen[i] = 1
result.append(i)
for i in other.interfaces():
if i not in seen:
seen[i] = 1
Expand Down
8 changes: 5 additions & 3 deletions src/zope/interface/tests/test_declarations.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,15 @@ def test_w_existing_Implements_w_bases(self):
from zope.interface.interface import InterfaceClass
IFoo = InterfaceClass('IFoo')
IBar = InterfaceClass('IBar')
IBaz = InterfaceClass('IBar')
IBaz = InterfaceClass('IBaz', IFoo)
b_impl = Implements(IBaz)
impl = Implements(IFoo)
impl.declared = (IFoo,)
class Base(object):
class Base1(object):
__implemented__ = b_impl
class Foo(Base):
class Base2(object):
__implemented__ = b_impl
class Foo(Base1, Base2):
__implemented__ = impl
impl.inherit = Foo
self._callFUT(Foo, IBar)
Expand Down

0 comments on commit b12b0bf

Please sign in to comment.