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