def setUp(self): self.proj = [] '''Create the projects''' for pId in xrange(1,self.numProjects+1): p = "./testProject" + str(pId) + "/" if os.path.exists(p + ".clang_complete.project.dict"): os.remove(p + ".clang_complete.project.dict") pd.onLoadFile(p + "main.cpp",self.args,1) pd.createOrUpdateProjectForFile(p + "main.cpp",["-x","c++"],[]) self.proj.append(pd.getProjectFromRoot(p)) assert self.proj[pId-1] is not None
import projectDatabase import os filePath = os.path.abspath('./file') if filePath != "": root = projectDatabase.createOrUpdateProjectForFile(filePath, [], {})