(self, mock_build_template, mock_write_file)
| 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='') |
nothing calls this directly
no test coverage detected