def test_config_alterations_class():
 class LineConfig(Config, ):
  no_prefix = True
  show_legend = False
  fill = True
  pretty_print = True
  x_labels = ['a', 'b', 'c']
 line1 = Line(LineConfig)
 line1.add('_', [1, 2, 3])
 l1 = line1.render()
 LineConfig.stroke = False
 line2 = Line(LineConfig)
 line2.add('_', [1, 2, 3])
 l2 = line2.render()
 assert (l1 != l2)
 l1bis = line1.render()
 assert (l1 == l1bis)

def test_config_alterations_class ( ) : class LineConfig ( Config , ) : no_prefix = True show_legend = False fill = True pretty_print = True x_labels = [ 'a' , 'b' , 'c' ] line1 = Line ( LineConfig ) line1 . add ( '_' , [ 1 , 2 , 3 ] ) l1 = line1 . render ( ) LineConfig . stroke = False line2 = Line ( LineConfig ) line2 . add ( '_' , [ 1 , 2 , 3 ] ) l2 = line2 . render ( ) assert ( l1 != l2 ) l1bis = line1 . render ( ) assert ( l1 == l1bis )
assert a config can be changed on config class .