-
Denis Laxalde authored
This is useful in tests because the doctest comparison engine from lxml works better with text objects. The new _encoding argument is essentially used a "encoding" argument of lxml's etree.tostring() which will hence serialize to a unicode string. When doing so, we must also avoid any XML declaration (otherwise, lxml messes up when loading the content, not sure why), so we insert the "standalone" flag only when dumping to bytes.
63e2c0ef1a8e