Source

pyyaml / tests / data / serializer-is-not-opened-2.dumper-error

dumper = Dumper(StringIO.StringIO())
dumper.serialize(ScalarNode(tag='!foo', value='bar'))