Show More
@@ -248,9 +248,6 b' class TestMagicRunSimple(tt.TempFileMixin):' | |||||
248 | " print('object A deleted')\n" |
|
248 | " print('object A deleted')\n" | |
249 | "a = A()\n") |
|
249 | "a = A()\n") | |
250 | self.mktmp(src) |
|
250 | self.mktmp(src) | |
251 | if dec.module_not_available('sqlite3'): |
|
|||
252 | err = 'WARNING: IPython History requires SQLite, your history will not be saved\n' |
|
|||
253 | else: |
|
|||
254 |
|
|
251 | err = None | |
255 | tt.ipexec_validate(self.fname, 'object A deleted', err) |
|
252 | tt.ipexec_validate(self.fname, 'object A deleted', err) | |
256 |
|
253 | |||
@@ -306,9 +303,6 b" ARGV 1-: ['C-third']" | |||||
306 | tclass.py: deleting object: C-second |
|
303 | tclass.py: deleting object: C-second | |
307 | tclass.py: deleting object: C-third |
|
304 | tclass.py: deleting object: C-third | |
308 | """ |
|
305 | """ | |
309 | if dec.module_not_available('sqlite3'): |
|
|||
310 | err = 'WARNING: IPython History requires SQLite, your history will not be saved\n' |
|
|||
311 | else: |
|
|||
312 |
|
|
306 | err = None | |
313 | tt.ipexec_validate(self.fname, out, err) |
|
307 | tt.ipexec_validate(self.fname, out, err) | |
314 |
|
308 |
@@ -20,9 +20,6 b' import unittest' | |||||
20 | from IPython.testing import decorators as dec |
|
20 | from IPython.testing import decorators as dec | |
21 | from IPython.testing import tools as tt |
|
21 | from IPython.testing import tools as tt | |
22 |
|
22 | |||
23 | sqlite_err_maybe = dec.module_not_available('sqlite3') |
|
|||
24 | SQLITE_NOT_AVAILABLE_ERROR = ('WARNING: IPython History requires SQLite,' |
|
|||
25 | ' your history will not be saved\n') |
|
|||
26 |
|
23 | |||
27 | class TestFileToRun(tt.TempFileMixin, unittest.TestCase): |
|
24 | class TestFileToRun(tt.TempFileMixin, unittest.TestCase): | |
28 | """Test the behavior of the file_to_run parameter.""" |
|
25 | """Test the behavior of the file_to_run parameter.""" | |
@@ -32,7 +29,7 b' class TestFileToRun(tt.TempFileMixin, unittest.TestCase):' | |||||
32 | src = "print(__file__)\n" |
|
29 | src = "print(__file__)\n" | |
33 | self.mktmp(src) |
|
30 | self.mktmp(src) | |
34 |
|
31 | |||
35 | err = SQLITE_NOT_AVAILABLE_ERROR if sqlite_err_maybe else None |
|
32 | err = None | |
36 | tt.ipexec_validate(self.fname, self.fname, err) |
|
33 | tt.ipexec_validate(self.fname, self.fname, err) | |
37 |
|
34 | |||
38 | def test_ipy_script_file_attribute(self): |
|
35 | def test_ipy_script_file_attribute(self): | |
@@ -40,7 +37,7 b' class TestFileToRun(tt.TempFileMixin, unittest.TestCase):' | |||||
40 | src = "print(__file__)\n" |
|
37 | src = "print(__file__)\n" | |
41 | self.mktmp(src, ext='.ipy') |
|
38 | self.mktmp(src, ext='.ipy') | |
42 |
|
39 | |||
43 | err = SQLITE_NOT_AVAILABLE_ERROR if sqlite_err_maybe else None |
|
40 | err = None | |
44 | tt.ipexec_validate(self.fname, self.fname, err) |
|
41 | tt.ipexec_validate(self.fname, self.fname, err) | |
45 |
|
42 | |||
46 | # The commands option to ipexec_validate doesn't work on Windows, and it |
|
43 | # The commands option to ipexec_validate doesn't work on Windows, and it |
General Comments 0
You need to be logged in to leave comments.
Login now