##// END OF EJS Templates
Merge pull request #11785 from Carreau/pytest_compat_setup_teardown...
Matthias Bussonnier -
r25089:f04ac268 merge
parent child Browse files
Show More
@@ -47,7 +47,7 b' def test_cache():'
47 47 cp.cache('x=1')
48 48 nt.assert_true(len(linecache.cache) > ncache)
49 49
50 def setUp():
50 def test_proper_default_encoding():
51 51 # Check we're in a proper Python 2 environment (some imports, such
52 52 # as GTK, can change the default encoding, which can hide bugs.)
53 53 nt.assert_equal(sys.getdefaultencoding(), "utf-8")
@@ -22,7 +22,7 b' from IPython.utils.tempdir import TemporaryDirectory'
22 22 from IPython.core.history import HistoryManager, extract_hist_ranges
23 23 from IPython.testing.decorators import skipif
24 24
25 def setUp():
25 def test_proper_default_encoding():
26 26 nt.assert_equal(sys.getdefaultencoding(), "utf-8")
27 27
28 28 @skipif(sqlite3.sqlite_version_info > (3,24,0))
@@ -19,7 +19,7 b' XDG_TEST_DIR = os.path.join(HOME_TEST_DIR, "xdg_test_dir")'
19 19 XDG_CACHE_DIR = os.path.join(HOME_TEST_DIR, "xdg_cache_dir")
20 20 IP_TEST_DIR = os.path.join(HOME_TEST_DIR,'.ipython')
21 21
22 def setup():
22 def setup_module():
23 23 """Setup testenvironment for the module:
24 24
25 25 - Adds dummy home dir tree
@@ -31,7 +31,7 b' def setup():'
31 31 os.makedirs(os.path.join(XDG_CACHE_DIR, 'ipython'))
32 32
33 33
34 def teardown():
34 def teardown_module():
35 35 """Teardown testenvironment for the module:
36 36
37 37 - Remove dummy home dir tree
@@ -48,7 +48,7 b" IP_TEST_DIR = os.path.join(HOME_TEST_DIR,'.ipython')"
48 48 # Setup/teardown functions/decorators
49 49 #
50 50
51 def setup():
51 def setup_module():
52 52 """Setup test environment for the module:
53 53
54 54 - Adds dummy home dir tree
@@ -58,7 +58,7 b' def setup():'
58 58 os.makedirs(IP_TEST_DIR)
59 59
60 60
61 def teardown():
61 def teardown_module():
62 62 """Teardown test environment for the module:
63 63
64 64 - Remove dummy home dir tree
@@ -40,7 +40,7 b' def make_empty_file(fname):'
40 40 open(fname, 'w').close()
41 41
42 42
43 def setup():
43 def setup_module():
44 44 """Setup testenvironment for the module:
45 45
46 46 """
@@ -54,7 +54,7 b' def setup():'
54 54 make_empty_file(join(TMP_TEST_DIR, "packpyc.pyc"))
55 55 sys.path = [TMP_TEST_DIR]
56 56
57 def teardown():
57 def teardown_module():
58 58 """Teardown testenvironment for the module:
59 59
60 60 - Remove tempdir
@@ -51,7 +51,7 b' HOME_TEST_DIR = join(TMP_TEST_DIR, "home_test_dir")'
51 51 # Setup/teardown functions/decorators
52 52 #
53 53
54 def setup():
54 def setup_module():
55 55 """Setup testenvironment for the module:
56 56
57 57 - Adds dummy home dir tree
@@ -61,7 +61,7 b' def setup():'
61 61 os.makedirs(os.path.join(HOME_TEST_DIR, 'ipython'))
62 62
63 63
64 def teardown():
64 def teardown_module():
65 65 """Teardown testenvironment for the module:
66 66
67 67 - Remove dummy home dir tree
General Comments 0
You need to be logged in to leave comments. Login now