From 5e556405db7aa8181d576e70149ff74039986838 2018-07-28 22:31:27 From: Matthias Bussonnier Date: 2018-07-28 22:31:27 Subject: [PATCH] Merge pull request #11173 from Carreau/reswarn Correctly tearDown some test cases with multiple inheritance. --- diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py index 12bd380..a8f6a4e 100644 --- a/IPython/core/tests/test_interactiveshell.py +++ b/IPython/core/tests/test_interactiveshell.py @@ -546,7 +546,8 @@ class ExitCodeChecks(tt.TempFileMixin): else: del os.environ['SHELL'] -class TestSystemRaw(unittest.TestCase, ExitCodeChecks): + +class TestSystemRaw(ExitCodeChecks, unittest.TestCase): system = ip.system_raw @onlyif_unicode_paths @@ -567,7 +568,7 @@ class TestSystemRaw(unittest.TestCase, ExitCodeChecks): self.assertEqual(ip.user_ns['_exit_code'], -signal.SIGINT) # TODO: Exit codes are currently ignored on Windows. -class TestSystemPipedExitCode(unittest.TestCase, ExitCodeChecks): +class TestSystemPipedExitCode(ExitCodeChecks, unittest.TestCase): system = ip.system_piped @skip_win32 @@ -582,7 +583,7 @@ class TestSystemPipedExitCode(unittest.TestCase, ExitCodeChecks): def test_exit_code_signal(self): ExitCodeChecks.test_exit_code_signal(self) -class TestModules(unittest.TestCase, tt.TempFileMixin): +class TestModules(tt.TempFileMixin, unittest.TestCase): def test_extraneous_loads(self): """Test we're not loading modules on startup that we shouldn't. """ diff --git a/IPython/core/tests/test_shellapp.py b/IPython/core/tests/test_shellapp.py index 8134269..5fb58a3 100644 --- a/IPython/core/tests/test_shellapp.py +++ b/IPython/core/tests/test_shellapp.py @@ -24,7 +24,7 @@ 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(unittest.TestCase, tt.TempFileMixin): +class TestFileToRun(tt.TempFileMixin, unittest.TestCase): """Test the behavior of the file_to_run parameter.""" def test_py_script_file_attribute(self):