def generate_conflicting_plot_options_with_json_writes_of_config():
 def gen_test(plot_options):
  def test(self):
   config = _json.load(open(CONFIG_FILE))
   with open(CONFIG_FILE, 'w') as f:
    config.update(plot_options)
    f.write(_json.dumps(config))
   self.assertRaises(PlotlyError, py._plot_option_logic, {})
  return test
 for (i, plot_options) in enumerate(TestPlotOptionLogic.conflicting_option_set):
  setattr(TestPlotOptionLogic, 'test_conflicting_plot_options_with_json_writes_of_config{}'.format(i), gen_test(plot_options))

def generate_conflicting_plot_options_with_json_writes_of_config ( ) : def gen_test ( plot_options ) : def test ( self ) : config = _json . load ( open ( CONFIG_FILE ) ) with open ( CONFIG_FILE , 'w' ) as f : config . update ( plot_options ) f . write ( _json . dumps ( config ) ) self . assertRaises ( PlotlyError , py . _plot_option_logic , { } ) return test for ( i , plot_options ) in enumerate ( TestPlotOptionLogic . conflicting_option_set ) : setattr ( TestPlotOptionLogic , 'test_conflicting_plot_options_with_json_writes_of_config{}' . format ( i ) , gen_test ( plot_options ) )
if the user wrote their own options in the config file .