diff --git a/IPython/core/tests/test_compilerop.py b/IPython/core/tests/test_compilerop.py index f1f88e4..4b2f715 100644 --- a/IPython/core/tests/test_compilerop.py +++ b/IPython/core/tests/test_compilerop.py @@ -47,7 +47,7 @@ def test_cache(): cp.cache('x=1') nt.assert_true(len(linecache.cache) > ncache) -def setUp(): +def test_proper_default_encoding(): # Check we're in a proper Python 2 environment (some imports, such # as GTK, can change the default encoding, which can hide bugs.) nt.assert_equal(sys.getdefaultencoding(), "utf-8") diff --git a/IPython/core/tests/test_history.py b/IPython/core/tests/test_history.py index 1760e46..f4f080d 100644 --- a/IPython/core/tests/test_history.py +++ b/IPython/core/tests/test_history.py @@ -22,7 +22,7 @@ from IPython.utils.tempdir import TemporaryDirectory from IPython.core.history import HistoryManager, extract_hist_ranges from IPython.testing.decorators import skipif -def setUp(): +def test_proper_default_encoding(): nt.assert_equal(sys.getdefaultencoding(), "utf-8") @skipif(sqlite3.sqlite_version_info > (3,24,0)) diff --git a/IPython/core/tests/test_paths.py b/IPython/core/tests/test_paths.py index 8f09001..ab1c413 100644 --- a/IPython/core/tests/test_paths.py +++ b/IPython/core/tests/test_paths.py @@ -19,7 +19,7 @@ XDG_TEST_DIR = os.path.join(HOME_TEST_DIR, "xdg_test_dir") XDG_CACHE_DIR = os.path.join(HOME_TEST_DIR, "xdg_cache_dir") IP_TEST_DIR = os.path.join(HOME_TEST_DIR,'.ipython') -def setup(): +def setup_module(): """Setup testenvironment for the module: - Adds dummy home dir tree @@ -31,7 +31,7 @@ def setup(): os.makedirs(os.path.join(XDG_CACHE_DIR, 'ipython')) -def teardown(): +def teardown_module(): """Teardown testenvironment for the module: - Remove dummy home dir tree diff --git a/IPython/core/tests/test_profile.py b/IPython/core/tests/test_profile.py index 021b31c..e63fb3e 100644 --- a/IPython/core/tests/test_profile.py +++ b/IPython/core/tests/test_profile.py @@ -48,7 +48,7 @@ IP_TEST_DIR = os.path.join(HOME_TEST_DIR,'.ipython') # Setup/teardown functions/decorators # -def setup(): +def setup_module(): """Setup test environment for the module: - Adds dummy home dir tree @@ -58,7 +58,7 @@ def setup(): os.makedirs(IP_TEST_DIR) -def teardown(): +def teardown_module(): """Teardown test environment for the module: - Remove dummy home dir tree diff --git a/IPython/utils/tests/test_module_paths.py b/IPython/utils/tests/test_module_paths.py index 38551cf..acdb770 100644 --- a/IPython/utils/tests/test_module_paths.py +++ b/IPython/utils/tests/test_module_paths.py @@ -40,7 +40,7 @@ def make_empty_file(fname): open(fname, 'w').close() -def setup(): +def setup_module(): """Setup testenvironment for the module: """ @@ -54,7 +54,7 @@ def setup(): make_empty_file(join(TMP_TEST_DIR, "packpyc.pyc")) sys.path = [TMP_TEST_DIR] -def teardown(): +def teardown_module(): """Teardown testenvironment for the module: - Remove tempdir diff --git a/IPython/utils/tests/test_path.py b/IPython/utils/tests/test_path.py index cca2384..7ca2be2 100644 --- a/IPython/utils/tests/test_path.py +++ b/IPython/utils/tests/test_path.py @@ -51,7 +51,7 @@ HOME_TEST_DIR = join(TMP_TEST_DIR, "home_test_dir") # Setup/teardown functions/decorators # -def setup(): +def setup_module(): """Setup testenvironment for the module: - Adds dummy home dir tree @@ -61,7 +61,7 @@ def setup(): os.makedirs(os.path.join(HOME_TEST_DIR, 'ipython')) -def teardown(): +def teardown_module(): """Teardown testenvironment for the module: - Remove dummy home dir tree