#NEWLINE# def test_configobj1( self ) : #NEWLINE# #INDENT# expected = '[test]\nparam1 = foo\nparam0 = foo\n\n[test1]\nparam1 = 5\n\n' #NEWLINE# config . IntParameter ( 'test1.param1' , 'a param' , default = 5 ) #NEWLINE# config . set ( 'test.param1' , 'foo' ) #NEWLINE# params = [ config . _parameters . get ( x ) for x in ( 'test.param0' , 'test.param1' , 'test1.param1' ) ] #NEWLINE# tmpfile = NamedTemporaryFile ( prefix = 'pebl.test' ) #NEWLINE# config . configobj ( params ) . write ( params ) #NEWLINE# tmpfile . file . seek ( 0 ) #NEWLINE# actual = tmpfile . read ( ) #NEWLINE# assert ( actual == expected )