#NEWLINE# @ skipIf ( ( not yaml . available ) , ( SKIP_MESSAGE % 'yaml' ) ) #NEWLINE# def test_serialize_yaml( self ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } #NEWLINE# serialized = yaml . serialize ( data ) #NEWLINE# assert ( serialized == '{foo: bar}' ) , serialized #NEWLINE# deserialized = yaml . deserialize ( serialized ) #NEWLINE# assert ( deserialized == data ) , deserialized