def test_add_config_values(self): app = Mock(Sphinx) setup(app) for name, (default, rebuild) in Config._config_values.items(): has_config = False for method_name, args, kwargs in app.method_calls: if (method_name == 'add_config_value' and args[0] == name): has_config = True if not has_config: self.fail('Config value was not added to app %s' % name) has_process_docstring = False has_skip_member = False for method_name, args, kwargs in app.method_calls: if method_name == 'connect': if (args[0] == 'autodoc-process-docstring' and args[1] == _process_docstring): has_process_docstring = True elif (args[0] == 'autodoc-skip-member' and args[1] == _skip_member): has_skip_member = True if not has_process_docstring: self.fail('autodoc-process-docstring never connected') if not has_skip_member: self.fail('autodoc-skip-member never connected')
def test_add_config_values(self): app = mock.Mock(Sphinx) setup(app) for name, (default, rebuild) in Config._config_values.items(): has_config = False for method_name, args, kwargs in app.method_calls: if(method_name == 'add_config_value' and args[0] == name): has_config = True if not has_config: self.fail('Config value was not added to app %s' % name) has_process_docstring = False has_skip_member = False for method_name, args, kwargs in app.method_calls: if method_name == 'connect': if(args[0] == 'autodoc-process-docstring' and args[1] == _process_docstring): has_process_docstring = True elif(args[0] == 'autodoc-skip-member' and args[1] == _skip_member): has_skip_member = True if not has_process_docstring: self.fail('autodoc-process-docstring never connected') if not has_skip_member: self.fail('autodoc-skip-member never connected')
def test_unknown_app_type(self): setup(object())