def getCompileCommands(self, filename):
"""
Get an iterable object providing all the CompileCommands available to
- build filename. Raise KeyError if filename is not found in the database.
+ build filename. Returns None if filename is not found in the database.
"""
return CompilationDatabase_getCompileCommands(self, filename)
cdb = CompilationDatabase.fromDirectory(kInputsDir)
def test_lookup_fail():
- """Check an assertion is raised when file lookup failed"""
+ """Check file lookup failure"""
cdb = CompilationDatabase.fromDirectory(kInputsDir)
assert cdb.getCompileCommands('file_do_not_exist.cpp') == None