MCPcopy
hub / github.com/mkdocs/mkdocs / test_skip_missing_theme_template

Method test_skip_missing_theme_template

mkdocs/tests/build_tests.py:248–258  ·  view source on GitHub ↗
(self, mock_build_template, mock_write_file)

Source from the content-addressed store, hash-verified

246 @mock.patch('mkdocs.utils.write_file')
247 @mock.patch('mkdocs.commands.build._build_template', return_value='')
248 def test_skip_missing_theme_template(self, mock_build_template, mock_write_file):
249 cfg = load_config()
250 env = cfg.theme.get_env()
251 with self.assertLogs('mkdocs') as cm:
252 build._build_theme_template('missing.html', env, Files([]), cfg, mock.Mock())
253 self.assertEqual(
254 '\n'.join(cm.output),
255 "WARNING:mkdocs.commands.build:Template skipped: 'missing.html' not found in theme directories.",
256 )
257 mock_write_file.assert_not_called()
258 mock_build_template.assert_not_called()
259
260 @mock.patch('mkdocs.utils.write_file')
261 @mock.patch('mkdocs.commands.build._build_template', return_value='')

Callers

nothing calls this directly

Calls 3

load_configFunction · 0.90
FilesClass · 0.90
get_envMethod · 0.80

Tested by

no test coverage detected