def test_needs_update(self): """Test view config changing when needed.""" file_name = path.join(path.dirname(__file__), 'test_files', 'test.cpp') self.set_up_view(file_name) manager = SettingsManager() settings = manager.settings_for_view(self.view) view_config = ViewConfig(self.view, settings) flags = view_config.completer.clang_flags is_update_needed = view_config.needs_update(view_config.completer, flags) self.assertFalse(is_update_needed) flags = [] is_update_needed = view_config.needs_update(view_config.completer, flags) self.assertTrue(is_update_needed)
def test_needs_update(self): """Test view config changing when needed.""" file_name = path.join(path.dirname(__file__), 'test_files', 'test.cpp') self.set_up_view(file_name) manager = SettingsManager() settings = manager.settings_for_view(self.view) view_config = ViewConfig(self.view, settings) flags = view_config.completer.clang_flags is_update_needed = view_config.needs_update(view_config.completer, flags) self.assertFalse(is_update_needed) flags = [] is_update_needed = view_config.needs_update( view_config.completer, flags) self.assertTrue(is_update_needed)