def test_empty_code(self): style = ReSTStyle(ReSTDocument()) style.start_code() style.end_code() self.assertEqual(style.doc.getvalue(), six.b(''))