def test_init_catalog_ignore_theme(self): dist = Distribution() dist.entry_points = ''' [mkdocs.themes] mkdocs = mkdocs.themes.mkdocs ''' cmd = babel.init_catalog(dist) cmd.initialize_options() cmd.theme = 'mkdocs' cmd.locale = 'en' cmd.input_file = 'mkdocs/themes/mkdocs/messages.pot' cmd.output_dir = 'foo/bar' cmd.finalize_options() self.assertEqual(cmd.input_file, 'mkdocs/themes/mkdocs/messages.pot') self.assertEqual(cmd.output_dir, 'foo/bar')
def test_init_catalog_ignore_theme_for_input(self): dist = Distribution() dist.entry_points = ''' [mkdocs.themes] mkdocs = mkdocs.themes.mkdocs ''' cmd = babel.init_catalog(dist) cmd.initialize_options() cmd.theme = 'mkdocs' cmd.locale = 'en' cmd.input_file = 'mkdocs/themes/mkdocs/messages.pot' cmd.finalize_options() self.assertEqual(cmd.input_file, 'mkdocs/themes/mkdocs/messages.pot') self.assertEqual( cmd.output_dir, path.join(BASE_DIR, 'mkdocs', 'themes', 'mkdocs/locales'))