Пример #1
0
 def testBasic(self):
     """See if it works at all"""
     for repl in ['python', 'sage']:
         try:
             runrepl._feed_lines(self.lines, repl, 'dummy_filename')
         except Exception, e:
             self.fail(str(e))
Пример #2
0
 def testBasic(self):
     """See if it works at all"""
     for repl in ["python", "sage"]:
         try:
             runrepl._feed_lines(self.lines, repl, "dummy_filename")
         except Exception, e:
             self.fail(str(e))
Пример #3
0
 def testError(self):
     """See if it works when the repl raises an error"""
     lines = ['a']
     for repl in ['python', 'sage']:
         try:
             runrepl._feed_lines(lines, repl, 'dummy_filename')
         except Exception, e:
             self.fail(str(e))
Пример #4
0
 def testContinuationPrompt(self):
     """See if the '...' prompt works at all"""
     lines = ['for i in range(9):', '    print str(i)', '', '2+3']
     for repl in ['python', 'sage']:
         try:
             runrepl._feed_lines(lines, repl, 'dummy_filename')
         except Exception, e:
             self.fail(str(e))
Пример #5
0
 def testContinuationPrompt(self):
     """See if the '...' prompt works at all"""
     lines = ["for i in range(9):", "    print str(i)", "", "2+3"]
     for repl in ["python", "sage"]:
         try:
             runrepl._feed_lines(lines, repl, "dummy_filename")
         except Exception, e:
             self.fail(str(e))
Пример #6
0
 def testError(self):
     """See if it works when the repl raises an error"""
     lines = ["a"]
     for repl in ["python", "sage"]:
         try:
             runrepl._feed_lines(lines, repl, "dummy_filename")
         except Exception, e:
             self.fail(str(e))