|67 ↗||(On Diff #48016)|
We can't because the expected array in this test is just the command line, it is different from the one in test_all_compilecommand where it represents the command line + file + directory.
I'm fine making a local variable to hold this filename so that we can have:
file = '/home/john.doe/MyProject/project.cpp' cmds = cdb.getCompileCommands(file) assert len(cmds) == 1 assert cmds.directory == '/home/john.doe/MyProject' assert cmds.filename == file
Do you think it's better?