def ExtraConfStore_ModuleForSourceFile_SupportSymlink_test(app): with TemporarySymlink(PathToTestFile('extra_conf', 'project'), PathToTestFile('extra_conf', 'symlink')): filename = PathToTestFile('extra_conf', 'project', 'some_file') module = extra_conf_store.ModuleForSourceFile(filename) assert_that(inspect.ismodule(module)) assert_that(inspect.getfile(module), equal_to(PROJECT_EXTRA_CONF))
def test_ExtraConfStore_ModuleForSourceFile_SupportSymlink(self, app): with TemporarySymlink(PathToTestFile('extra_conf', 'project'), PathToTestFile('extra_conf', 'symlink')): filename = PathToTestFile('extra_conf', 'project', 'some_file') module = extra_conf_store.ModuleForSourceFile(filename) assert_that(inspect.ismodule(module)) assert_that(inspect.getfile(module), equal_to(PROJECT_EXTRA_CONF)) assert_that(module, has_property('is_global_ycm_extra_conf')) assert_that(module.is_global_ycm_extra_conf, equal_to(False)) assert_that(extra_conf_store.IsGlobalExtraConfModule(module), equal_to(False))