def testBasic(self): """See if it works at all""" for repl in ['python', 'sage']: self._writeAndFlush("\n".join(self.lines)) try: responses = runrepl.feed_lines(self.fn_prefix, repl) # print "responses is", pprint.pformat(responses) except Exception, e: self.fail(str(e))
def testBasic(self): """See if it works at all""" for repl in ["python", "sage"]: self._writeAndFlush("\n".join(self.lines)) try: responses = runrepl.feed_lines(self.fn_prefix, repl) # print "responses is", pprint.pformat(responses) except Exception, e: self.fail(str(e))
def testBlankLines(self): """It should strip blank lines before processing""" for repl in ['python', 'sage']: self._writeAndFlush("\n" + ("\n".join(self.lines)) + "\n") try: responses = runrepl.feed_lines(self.fn_prefix, repl) # print "responses is", pprint.pformat(responses) except Exception, e: self.fail(str(e)) if responses[0] == "\n": self.fail("expected initial blank line to be stripped") if responses[-1] == "\n": self.fail("expected final blank line to be stripped")
def testBlankLines(self): """It should strip blank lines before processing""" for repl in ["python", "sage"]: self._writeAndFlush("\n" + ("\n".join(self.lines)) + "\n") try: responses = runrepl.feed_lines(self.fn_prefix, repl) # print "responses is", pprint.pformat(responses) except Exception, e: self.fail(str(e)) if responses[0] == "\n": self.fail("expected initial blank line to be stripped") if responses[-1] == "\n": self.fail("expected final blank line to be stripped")