def show_in_rest(self): """ in Interactive test, self.code is repeated in self.expect, so no need to print it. """ output_rst.show_header(args.lang_format, self.human_name) expected = self._expect_as_utf8().strip("\n") if expected == "": raise AssertionError('%s has no expected output') output_rst.show_pre(expected)
def show_in_rest(self): """ show code. currently output ReST (for my book) """ output_rst.show_header(args.lang_format, self.human_name) output_rst.show_pre(self._code_as_utf8().strip("\n"), self.pygments_name) if not args.suppress_expected: expected = self._expect_as_utf8().strip("\n") if expected == "": expected = "(no output)" output_rst.show_pre(expected)