当前位置: 首页>>代码示例>>Python>>正文


Python Project.extra_devs方法代码示例

本文整理汇总了Python中models.Project.extra_devs方法的典型用法代码示例。如果您正苦于以下问题:Python Project.extra_devs方法的具体用法?Python Project.extra_devs怎么用?Python Project.extra_devs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在models.Project的用法示例。


在下文中一共展示了Project.extra_devs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_lots_of_awesome

# 需要导入模块: from models import Project [as 别名]
# 或者: from models.Project import extra_devs [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())
开发者ID:acrespo,项目名称:Simulaciones,代码行数:27,代码来源:test.py

示例2: test_undeliverable_awesome

# 需要导入模块: from models import Project [as 别名]
# 或者: from models.Project import extra_devs [as 别名]
    def test_undeliverable_awesome(self):
        p1 = Project(300, 1, 3)
        p2 = Project(300, 1, 3)

        awesome = Project(300, 1, 3)
        awesome.is_awesome = True
        awesome.extra_devs = 2

        w = Workflow(6, 2, [p1, p2, awesome])
        self.assertTrue(w.is_deliverable())

        not_awesome = Project(300, 1, 3)
        not_awesome.is_awesome = True
        not_awesome.extra_devs = 2

        w2 = w.add_project(not_awesome)
        self.assertFalse(w2.is_deliverable())
开发者ID:acrespo,项目名称:Simulaciones,代码行数:19,代码来源:test.py

示例3: test_parallel_awesome

# 需要导入模块: from models import Project [as 别名]
# 或者: from models.Project import extra_devs [as 别名]
    def test_parallel_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

        w = Workflow(6, 2, [p1, p2, awesome])
        self.assertTrue(w.is_deliverable())

        not_awesome = Project(160, 1, 1)
        not_awesome.is_awesome = True
        not_awesome.extra_devs = 1

        w2 = w.add_project(not_awesome)
        self.assertTrue(w2.is_deliverable())
开发者ID:acrespo,项目名称:Simulaciones,代码行数:19,代码来源:test.py

示例4: test_sequential_awesome

# 需要导入模块: from models import Project [as 别名]
# 或者: from models.Project import extra_devs [as 别名]
    def test_sequential_awesome(self):
        p1 = Project(2 * 480, 1, 2)
        p2 = Project(2 * 480, 1, 2)

        awesome = Project(320, 1, 3)
        awesome.is_awesome = True
        awesome.extra_devs = 2

        w = Workflow(6, 2, [p1, p2, awesome])
        self.assertTrue(w.is_deliverable())

        not_awesome = Project(320, 1, 1)
        not_awesome.is_awesome = True
        not_awesome.extra_devs = 2

        w2 = w.add_project(not_awesome)
        self.assertTrue(w2.is_deliverable())
开发者ID:acrespo,项目名称:Simulaciones,代码行数:19,代码来源:test.py

示例5: test_deliverable_awesome

# 需要导入模块: from models import Project [as 别名]
# 或者: from models.Project import extra_devs [as 别名]
    def test_deliverable_awesome(self):
        p1 = Project(300, 1, 3)
        p2 = Project(300, 1, 3)

        w = Workflow(6, 2, [p1, p2])
        self.assertTrue(w.is_deliverable())

        awesome = Project(300, 1, 3)
        awesome.is_awesome = True

        w2 = w.add_project(awesome)
        self.assertFalse(w2.is_deliverable())

        awesome.extra_devs = 1
        self.assertFalse(w2.is_deliverable())

        awesome.extra_devs = 2
        self.assertTrue(w2.is_deliverable())
开发者ID:acrespo,项目名称:Simulaciones,代码行数:20,代码来源:test.py


注:本文中的models.Project.extra_devs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。