def test_bold(self): style = ReSTStyle(ReSTDocument()) style.bold('foobar') self.assertEqual(style.doc.getvalue(), six.b('**foobar** '))