本文整理匯總了Python中models.Project.periods_to_delivery方法的典型用法代碼示例。如果您正苦於以下問題:Python Project.periods_to_delivery方法的具體用法?Python Project.periods_to_delivery怎麽用?Python Project.periods_to_delivery使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類models.Project
的用法示例。
在下文中一共展示了Project.periods_to_delivery方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_lots_of_awesome
# 需要導入模塊: from models import Project [as 別名]
# 或者: from models.Project import periods_to_delivery [as 別名]
def test_lots_of_awesome(self):
p1 = Project(2 * 480, 1, 2)
p2 = Project(2 * 480, 1, 2)
awesome = Project(160, 1, 1)
awesome.is_awesome = True
awesome.extra_devs = 1
not_awesome = Project(2 * 160, 1, 1)
not_awesome.is_awesome = True
not_awesome.extra_devs = 1
w = Workflow(7, 3, [p1, p2, awesome, not_awesome])
self.assertTrue(w.is_deliverable())
more_awesome = Project(6 * 160, 1, 1)
more_awesome.periods_to_delivery = 3
more_awesome.is_awesome = True
more_awesome.extra_devs = 2
w2 = w.add_project(more_awesome)
self.assertFalse(w2.is_deliverable(), msg = "Fails, it need one more dev")
more_awesome.extra_devs = 3
self.assertTrue(w2.is_deliverable())