Ignore certain lines for code coverage.

svn path=/plone.app.discussion/trunk/; revision=40081
This commit is contained in:
Timo Stollenwerk 2010-09-20 10:02:07 +00:00
parent 9f605ab53b
commit aeabd6fc11
2 changed files with 12 additions and 12 deletions

View File

@ -28,7 +28,7 @@ def total_comments(object):
try: try:
conversation = IConversation(object) conversation = IConversation(object)
return conversation.total_comments return conversation.total_comments
except TypeError: except TypeError: # pragma: no cover
# The item is contentish but nobody # The item is contentish but nobody
# implemented an adapter for it # implemented an adapter for it
pass pass
@ -41,7 +41,7 @@ def last_comment_date(object):
try: try:
conversation = IConversation(object) conversation = IConversation(object)
return conversation.last_comment_date return conversation.last_comment_date
except TypeError: except TypeError: # pragma: no cover
# The item is contentish but nobody # The item is contentish but nobody
# implemented an adapter for it # implemented an adapter for it
pass pass
@ -54,7 +54,7 @@ def commentators(object):
try: try:
conversation = IConversation(object) conversation = IConversation(object)
return tuple(conversation.commentators.keys()) return tuple(conversation.commentators.keys())
except TypeError: except TypeError: # pragma: no cover
# The item is contentish but nobody # The item is contentish but nobody
# implemented an adapter for it # implemented an adapter for it
pass pass

View File

@ -42,10 +42,10 @@ try:
# Plone 4 # Plone 4
from zope.lifecycleevent import ObjectAddedEvent from zope.lifecycleevent import ObjectAddedEvent
from zope.lifecycleevent import ObjectRemovedEvent from zope.lifecycleevent import ObjectRemovedEvent
except ImportError: except ImportError: # pragma: no cover
# Plone 3.x # Plone 3.x
from zope.app.container.contained import ObjectAddedEvent from zope.app.container.contained import ObjectAddedEvent # pragma: no cover
from zope.app.container.contained import ObjectRemovedEvent from zope.app.container.contained import ObjectRemovedEvent # pragma: no cover
from BTrees.OIBTree import OIBTree from BTrees.OIBTree import OIBTree
@ -53,9 +53,9 @@ try:
# These exist in new versions, but not in the one that comes with Zope 2.10. # These exist in new versions, but not in the one that comes with Zope 2.10.
from BTrees.LOBTree import LOBTree from BTrees.LOBTree import LOBTree
from BTrees.LLBTree import LLSet from BTrees.LLBTree import LLSet
except ImportError: except ImportError: # pragma: no cover
from BTrees.OOBTree import OOBTree as LOBTree from BTrees.OOBTree import OOBTree as LOBTree # pragma: no cover
from BTrees.OOBTree import OOSet as LLSet from BTrees.OOBTree import OOSet as LLSet # pragma: no cover
from plone.app.discussion.interfaces import IConversation from plone.app.discussion.interfaces import IConversation
from plone.app.discussion.interfaces import IDiscussionSettings from plone.app.discussion.interfaces import IDiscussionSettings
@ -364,9 +364,9 @@ try:
except ImportError: except ImportError:
pass pass
else: else:
@implementer(IConversation) @implementer(IConversation) # pragma: no cover
@adapter(IAnnotatable) @adapter(IAnnotatable) # pragma: no cover
def conversationCanonicalAdapterFactory(content): def conversationCanonicalAdapterFactory(content): # pragma: no cover
"""Adapter factory to fetch the default conversation from annotations. """Adapter factory to fetch the default conversation from annotations.
Will create the conversation if it does not exist. Will create the conversation if it does not exist.