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()], )
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.' )