Ignore certain lines for code coverage.
svn path=/plone.app.discussion/trunk/; revision=40082
This commit is contained in:
parent
aeabd6fc11
commit
cbde125048
@ -34,7 +34,7 @@ def patchedClearFindAndRebuild(self):
|
|||||||
comment = comment.__of__(conversation)
|
comment = comment.__of__(conversation)
|
||||||
if catalog:
|
if catalog:
|
||||||
catalog.indexObject(comment)
|
catalog.indexObject(comment)
|
||||||
except StopIteration:
|
except StopIteration: # pragma: no cover
|
||||||
pass
|
pass
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
|
@ -13,6 +13,7 @@ from interfaces import ICommentingTool, IComment
|
|||||||
from Products.CMFCore.utils import UniqueObject, getToolByName
|
from Products.CMFCore.utils import UniqueObject, getToolByName
|
||||||
from OFS.SimpleItem import SimpleItem
|
from OFS.SimpleItem import SimpleItem
|
||||||
|
|
||||||
|
|
||||||
class CommentingTool(UniqueObject, SimpleItem):
|
class CommentingTool(UniqueObject, SimpleItem):
|
||||||
|
|
||||||
interface.implements(ICommentingTool)
|
interface.implements(ICommentingTool)
|
||||||
|
@ -7,28 +7,28 @@ from plone.app.discussion.interfaces import _
|
|||||||
HAS_CAPTCHA = False
|
HAS_CAPTCHA = False
|
||||||
try:
|
try:
|
||||||
import plone.formwidget.captcha
|
import plone.formwidget.captcha
|
||||||
HAS_CAPTCHA = True
|
HAS_CAPTCHA = True # pragma: no cover
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
HAS_RECAPTCHA = False
|
HAS_RECAPTCHA = False
|
||||||
try:
|
try:
|
||||||
import plone.formwidget.recaptcha
|
import plone.formwidget.recaptcha
|
||||||
HAS_RECAPTCHA = True
|
HAS_RECAPTCHA = True # pragma: no cover
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
HAS_AKISMET = False
|
HAS_AKISMET = False
|
||||||
try:
|
try:
|
||||||
import collective.akismet
|
import collective.akismet
|
||||||
HAS_AKISMET = True
|
HAS_AKISMET = True # pragma: no cover
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
HAS_NOROBOTS = False
|
HAS_NOROBOTS = False
|
||||||
try:
|
try:
|
||||||
import collective.z3cform.norobots
|
import collective.z3cform.norobots
|
||||||
HAS_NOROBOTS = True
|
HAS_NOROBOTS = True # pragma: no cover
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -43,36 +43,35 @@ def captcha_vocabulary(context):
|
|||||||
token='disabled',
|
token='disabled',
|
||||||
title=_(u'Disabled')))
|
title=_(u'Disabled')))
|
||||||
|
|
||||||
if HAS_CAPTCHA:
|
if HAS_CAPTCHA: # pragma: no cover
|
||||||
terms.append(
|
terms.append(
|
||||||
SimpleTerm(
|
SimpleTerm(
|
||||||
value='captcha',
|
value='captcha',
|
||||||
token='captcha',
|
token='captcha',
|
||||||
title='Captcha'))
|
title='Captcha'))
|
||||||
if HAS_RECAPTCHA:
|
|
||||||
|
if HAS_RECAPTCHA: # pragma: no cover
|
||||||
terms.append(
|
terms.append(
|
||||||
SimpleTerm(
|
SimpleTerm(
|
||||||
value='recaptcha',
|
value='recaptcha',
|
||||||
token='recaptcha',
|
token='recaptcha',
|
||||||
title='ReCaptcha'))
|
title='ReCaptcha'))
|
||||||
if HAS_AKISMET:
|
|
||||||
|
if HAS_AKISMET: # pragma: no cover
|
||||||
terms.append(
|
terms.append(
|
||||||
SimpleTerm(
|
SimpleTerm(
|
||||||
value='akismet',
|
value='akismet',
|
||||||
token='akismet',
|
token='akismet',
|
||||||
title='Akismet'))
|
title='Akismet'))
|
||||||
|
|
||||||
|
if HAS_NOROBOTS: # pragma: no cover
|
||||||
if HAS_NOROBOTS:
|
terms.append(
|
||||||
terms.append(
|
|
||||||
SimpleTerm(
|
SimpleTerm(
|
||||||
value='norobots',
|
value='norobots',
|
||||||
token='norobots',
|
token='norobots',
|
||||||
title='Norobots'))
|
title='Norobots'))
|
||||||
|
|
||||||
return SimpleVocabulary(terms)
|
return SimpleVocabulary(terms)
|
||||||
|
|
||||||
|
|
||||||
def text_transform_vocabulary(context):
|
def text_transform_vocabulary(context):
|
||||||
"""Vocabulary with all available portal_transform transformations.
|
"""Vocabulary with all available portal_transform transformations.
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user