Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_no_theme(self):
copytree(os.path.join(test_data_dir, 'no_theme'), self.stage)
self.assertRaises(ValueError, commands.install_extras, self.mkdocs_yml)
commands.install_extras(self.mkdocs_yml, theme='mkdocs')
self._test_extras()
def test_theme_object(self):
copytree(os.path.join(test_data_dir, 'theme_object'), self.stage)
commands.install_extras(self.mkdocs_yml)
self._test_extras()
def test_basic_theme(self):
copytree(os.path.join(test_data_dir, 'basic_theme'), self.stage)
commands.install_extras(self.mkdocs_yml)
self._test_extras()
def test_no_theme(self):
copytree(os.path.join(test_data_dir, 'no_theme'), self.stage)
self.assertRaises(ValueError, commands.install_extras, self.mkdocs_yml)
commands.install_extras(self.mkdocs_yml, theme='mkdocs')
self._test_extras()
def test_install_twice(self):
copytree(os.path.join(test_data_dir, 'basic_theme'), self.stage)
commands.install_extras(self.mkdocs_yml)
commands.install_extras(self.mkdocs_yml)
self._test_extras()
def install_extras(args):
commands.install_extras(args.config_file, args.theme)