Exemplo n.º 1
0
 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))
Exemplo n.º 2
0
 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))
Exemplo n.º 3
0
 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")
Exemplo n.º 4
0
 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")