class_docstr: Provided a file, it should read it, replace the default values,
  append new values to the settings (if any), and apply basic settings
  optimizations.
class_docstr_tok: ["Provided","a","file",",","it","should","read","it",",","replace","the","default","values",",","append","new","values","to","the","settings","(","if","any",")",",","and","apply","basic","settings","optimizations","."]
code: def test_theme_settings_exceptions(self):
      settings = self.settings
  
      # Check that theme lookup in "pelican/themes" functions as expected
      settings["THEME"] = os.path.split(settings["THEME"])[1]
      configure_settings(settings)
      self.assertEqual(settings["THEME"], DEFAULT_THEME)
  
      # Check that non-existent theme raises exception
      settings["THEME"] = "foo"
      self.assertRaises(Exception, configure_settings, settings)
  
imports: import copy
  import locale
  import os
  from os.path import abspath, dirname, join
  from pelican.settings import DEFAULT_CONFIG, DEFAULT_THEME, _printf_s_to_format_field, configure_settings, handle_deprecated_settings, read_settings
  from pelican.tests.support import unittest
label_desc: Use image node_id 11 for calling the TestSettingsConfiguration obj's underlying member method code with example usage: obj.test_theme_settings_exceptions() without return types