本文整理匯總了Python中lancelot.Spec.add_related_verifiables方法的典型用法代碼示例。如果您正苦於以下問題:Python Spec.add_related_verifiables方法的具體用法?Python Spec.add_related_verifiables怎麽用?Python Spec.add_related_verifiables使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類lancelot.Spec
的用法示例。
在下文中一共展示了Spec.add_related_verifiables方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: grouped_methods_should_verify
# 需要導入模塊: from lancelot import Spec [as 別名]
# 或者: from lancelot.Spec import add_related_verifiables [as 別名]
def grouped_methods_should_verify(self):
''' grouping() methods should allow them to be executed & verified '''
all_verifiable = silent_listener()
def add_related_verifiables():
grouping(RelatedVerifiables, all_verifiable)
verifiable(RelatedVerifiables.verifiable1, all_verifiable)
verifiable(RelatedVerifiables.verifiable2, all_verifiable)
all_verifiable.add_related_verifiables = add_related_verifiables
spec = Spec(all_verifiable)
spec.when(spec.add_related_verifiables())
spec.then(spec.total()).should_be(2)
spec.then(spec.verify())
spec.should_be({'total':2, 'verified':2, 'unverified':0})