From aeabd6fc11a000f95611bfb4b3d7c3bf4fe210ca Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 20 Sep 2010 10:02:07 +0000 Subject: [PATCH] Ignore certain lines for code coverage. svn path=/plone.app.discussion/trunk/; revision=40081 --- plone/app/discussion/catalog.py | 6 +++--- plone/app/discussion/conversation.py | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plone/app/discussion/catalog.py b/plone/app/discussion/catalog.py index 00067bb..4eb9a4a 100644 --- a/plone/app/discussion/catalog.py +++ b/plone/app/discussion/catalog.py @@ -28,7 +28,7 @@ def total_comments(object): try: conversation = IConversation(object) return conversation.total_comments - except TypeError: + except TypeError: # pragma: no cover # The item is contentish but nobody # implemented an adapter for it pass @@ -41,7 +41,7 @@ def last_comment_date(object): try: conversation = IConversation(object) return conversation.last_comment_date - except TypeError: + except TypeError: # pragma: no cover # The item is contentish but nobody # implemented an adapter for it pass @@ -54,7 +54,7 @@ def commentators(object): try: conversation = IConversation(object) return tuple(conversation.commentators.keys()) - except TypeError: + except TypeError: # pragma: no cover # The item is contentish but nobody # implemented an adapter for it pass diff --git a/plone/app/discussion/conversation.py b/plone/app/discussion/conversation.py index d38b38f..e716c8a 100644 --- a/plone/app/discussion/conversation.py +++ b/plone/app/discussion/conversation.py @@ -42,10 +42,10 @@ try: # Plone 4 from zope.lifecycleevent import ObjectAddedEvent from zope.lifecycleevent import ObjectRemovedEvent -except ImportError: +except ImportError: # pragma: no cover # Plone 3.x - from zope.app.container.contained import ObjectAddedEvent - from zope.app.container.contained import ObjectRemovedEvent + from zope.app.container.contained import ObjectAddedEvent # pragma: no cover + from zope.app.container.contained import ObjectRemovedEvent # pragma: no cover 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. from BTrees.LOBTree import LOBTree from BTrees.LLBTree import LLSet -except ImportError: - from BTrees.OOBTree import OOBTree as LOBTree - from BTrees.OOBTree import OOSet as LLSet +except ImportError: # pragma: no cover + from BTrees.OOBTree import OOBTree as LOBTree # pragma: no cover + from BTrees.OOBTree import OOSet as LLSet # pragma: no cover from plone.app.discussion.interfaces import IConversation from plone.app.discussion.interfaces import IDiscussionSettings @@ -364,9 +364,9 @@ try: except ImportError: pass else: - @implementer(IConversation) - @adapter(IAnnotatable) - def conversationCanonicalAdapterFactory(content): + @implementer(IConversation) # pragma: no cover + @adapter(IAnnotatable) # pragma: no cover + def conversationCanonicalAdapterFactory(content): # pragma: no cover """Adapter factory to fetch the default conversation from annotations. Will create the conversation if it does not exist.