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

def test_config_alterations_kwargs ( ) : class LineConfig ( Config , ) : no_prefix = True show_legend = False fill = True pretty_print = True x_labels = [ 'a' , 'b' , 'c' ] config = LineConfig ( ) line1 = Line ( config ) line1 . add ( '_' , [ 1 , 2 , 3 ] ) l1 = line1 . render ( ) line1 . stroke = False l1bis = line1 . render ( ) assert ( l1 != l1bis ) line2 = Line ( config ) line2 . add ( '_' , [ 1 , 2 , 3 ] ) l2 = line2 . render ( ) assert ( l1 == l2 ) assert ( l1bis != l2 ) line3 = Line ( config , title = 'Title' ) line3 . add ( '_' , [ 1 , 2 , 3 ] ) l3 = line3 . render ( ) assert ( l3 != l2 ) l2bis = line2 . render ( ) assert ( l2 == l2bis )
assert a config can be changed with keyword args .