From 7b277c4fb582a2bb16e34ab47619a2052654d33e 2020-02-27 05:23:20 From: Terry Davis <16829776+terrdavis@users.noreply.github.com> Date: 2020-02-27 05:23:20 Subject: [PATCH] Assume sqlite3 always available in testing. --- diff --git a/IPython/core/tests/test_run.py b/IPython/core/tests/test_run.py index 38d71b3..e4f37d5 100644 --- a/IPython/core/tests/test_run.py +++ b/IPython/core/tests/test_run.py @@ -248,10 +248,7 @@ class TestMagicRunSimple(tt.TempFileMixin): " print('object A deleted')\n" "a = A()\n") self.mktmp(src) - if dec.module_not_available('sqlite3'): - err = 'WARNING: IPython History requires SQLite, your history will not be saved\n' - else: - err = None + err = None tt.ipexec_validate(self.fname, 'object A deleted', err) def test_aggressive_namespace_cleanup(self): @@ -306,10 +303,7 @@ ARGV 1-: ['C-third'] tclass.py: deleting object: C-second tclass.py: deleting object: C-third """ - if dec.module_not_available('sqlite3'): - err = 'WARNING: IPython History requires SQLite, your history will not be saved\n' - else: - err = None + err = None tt.ipexec_validate(self.fname, out, err) def test_run_i_after_reset(self): diff --git a/IPython/core/tests/test_shellapp.py b/IPython/core/tests/test_shellapp.py index 6808114..f9ea578 100644 --- a/IPython/core/tests/test_shellapp.py +++ b/IPython/core/tests/test_shellapp.py @@ -20,9 +20,6 @@ import unittest from IPython.testing import decorators as dec from IPython.testing import tools as tt -sqlite_err_maybe = dec.module_not_available('sqlite3') -SQLITE_NOT_AVAILABLE_ERROR = ('WARNING: IPython History requires SQLite,' - ' your history will not be saved\n') class TestFileToRun(tt.TempFileMixin, unittest.TestCase): """Test the behavior of the file_to_run parameter.""" @@ -32,7 +29,7 @@ class TestFileToRun(tt.TempFileMixin, unittest.TestCase): src = "print(__file__)\n" self.mktmp(src) - err = SQLITE_NOT_AVAILABLE_ERROR if sqlite_err_maybe else None + err = None tt.ipexec_validate(self.fname, self.fname, err) def test_ipy_script_file_attribute(self): @@ -40,7 +37,7 @@ class TestFileToRun(tt.TempFileMixin, unittest.TestCase): src = "print(__file__)\n" self.mktmp(src, ext='.ipy') - err = SQLITE_NOT_AVAILABLE_ERROR if sqlite_err_maybe else None + err = None tt.ipexec_validate(self.fname, self.fname, err) # The commands option to ipexec_validate doesn't work on Windows, and it