def test_arg_to_option(self): """ Check that we parse parameters passed to mkdocs properly """ arg, option = main.arg_to_option("--site-dir=dir") self.assertEqual("site_dir", arg) self.assertEqual("dir", option) arg, option = main.arg_to_option("--site-dir=dir-name") self.assertEqual("site_dir", arg) self.assertEqual("dir-name", option) arg, option = main.arg_to_option("--site-dir=dir=name") self.assertEqual("site_dir", arg) self.assertEqual("dir=name", option) arg, option = main.arg_to_option("--use_directory_urls") self.assertEqual("use_directory_urls", arg) self.assertEqual(True, option)
def test_arg_to_option(self): """ Check that we parse parameters passed to mkdocs properly """ arg, option = main.arg_to_option('--site-dir=dir') self.assertEqual('site_dir', arg) self.assertEqual('dir', option) arg, option = main.arg_to_option('--site-dir=dir-name') self.assertEqual('site_dir', arg) self.assertEqual('dir-name', option) arg, option = main.arg_to_option('--site-dir=dir=name') self.assertEqual('site_dir', arg) self.assertEqual('dir=name', option) arg, option = main.arg_to_option('--use_directory_urls') self.assertEqual('use_directory_urls', arg) self.assertEqual(True, option)