##// END OF EJS Templates
Fix shellapp tests
Thomas Kluyver -
Show More
@@ -52,10 +52,9 b' class TestFileToRun(unittest.TestCase, tt.TempFileMixin):'
52 src = "True\n"
52 src = "True\n"
53 self.mktmp(src)
53 self.mktmp(src)
54
54
55 out = 'In [1]: False\n\nIn [2]:'
55 out, err = tt.ipexec(self.fname, options=['-i'],
56 err = SQLITE_NOT_AVAILABLE_ERROR if sqlite_err_maybe else None
57 tt.ipexec_validate(self.fname, out, err, options=['-i'],
58 commands=['"__file__" in globals()', 'exit()'])
56 commands=['"__file__" in globals()', 'exit()'])
57 self.assertIn("False", out)
59
58
60 @dec.skip_win32
59 @dec.skip_win32
61 @dec.skipif(PY3)
60 @dec.skipif(PY3)
@@ -64,7 +63,6 b' class TestFileToRun(unittest.TestCase, tt.TempFileMixin):'
64 src = "from __future__ import division\n"
63 src = "from __future__ import division\n"
65 self.mktmp(src)
64 self.mktmp(src)
66
65
67 out = 'In [1]: float\n\nIn [2]:'
66 out, err = tt.ipexec(self.fname, options=['-i'],
68 err = SQLITE_NOT_AVAILABLE_ERROR if sqlite_err_maybe else None
69 tt.ipexec_validate(self.fname, out, err, options=['-i'],
70 commands=['type(1/2)', 'exit()'])
67 commands=['type(1/2)', 'exit()'])
68 self.assertIn('float', out)
@@ -202,13 +202,7 b' def ipexec(fname, options=None, commands=()):'
202 """
202 """
203 if options is None: options = []
203 if options is None: options = []
204
204
205 # For these subprocess calls, eliminate all prompt printing so we only see
205 cmdargs = default_argv() + options
206 # output from script execution
207 prompt_opts = [ '--PromptManager.in_template=""',
208 '--PromptManager.in2_template=""',
209 '--PromptManager.out_template=""'
210 ]
211 cmdargs = default_argv() + prompt_opts + options
212
206
213 test_dir = os.path.dirname(__file__)
207 test_dir = os.path.dirname(__file__)
214
208
General Comments 0
You need to be logged in to leave comments. Login now