當前位置: 首頁>>代碼示例>>Python>>正文


Python Project.get_constraints方法代碼示例

本文整理匯總了Python中chiptools.core.project.Project.get_constraints方法的典型用法代碼示例。如果您正苦於以下問題:Python Project.get_constraints方法的具體用法?Python Project.get_constraints怎麽用?Python Project.get_constraints使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在chiptools.core.project.Project的用法示例。


在下文中一共展示了Project.get_constraints方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: testProjectConstraints

# 需要導入模塊: from chiptools.core.project import Project [as 別名]
# 或者: from chiptools.core.project.Project import get_constraints [as 別名]
 def testProjectConstraints(self):
     project = Project()
     XmlProjectParser.load_project(self.project_path, project)
     # Check the project constraints
     self.assertEqual(
         self.project_constraints,
         [os.path.basename(c.path) for c in project.get_constraints()],
     )
開發者ID:hoangt,項目名稱:chiptools,代碼行數:10,代碼來源:testProjectFunctionality.py

示例2: test_constraints

# 需要導入模塊: from chiptools.core.project import Project [as 別名]
# 或者: from chiptools.core.project.Project import get_constraints [as 別名]
 def test_constraints(self):
     project = Project()
     for constraints in self.project_constraints:
         project.add_constraints(constraints, flow='dummy_flow')
     constraints = project.get_constraints()
     self.assertEquals(
         len(constraints),
         len(self.project_constraints),
         msg='Incorrect number of constraints added to project.'
     )
     self.assertTrue(
         len(constraints) > 0,
         msg='Not correctly tested as no constraints are present.'
     )
     for idx in range(len(constraints)):
         self.assertEquals(
             constraints[idx].path,
             os.path.abspath(self.project_constraints[idx]),
             msg='Constraints path was incorrectly processed.'
         )
開發者ID:pabennett,項目名稱:chiptools,代碼行數:22,代碼來源:test_project.py


注:本文中的chiptools.core.project.Project.get_constraints方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。