Show More
@@ -11,7 +11,7 b' except ImportError: # Python 2' | |||||
11 | from mock import patch |
|
11 | from mock import patch | |
12 |
|
12 | |||
13 | import nose.tools as nt |
|
13 | import nose.tools as nt | |
14 | from testpath import modified_env |
|
14 | from testpath import modified_env, assert_isdir, assert_isfile | |
15 |
|
15 | |||
16 | from IPython import paths |
|
16 | from IPython import paths | |
17 | from IPython.testing.decorators import skip_win32 |
|
17 | from IPython.testing.decorators import skip_win32 | |
@@ -183,12 +183,12 b' def test_get_ipython_cache_dir():' | |||||
183 | ipdir = paths.get_ipython_cache_dir() |
|
183 | ipdir = paths.get_ipython_cache_dir() | |
184 | nt.assert_equal(os.path.join(HOME_TEST_DIR, ".cache", "ipython"), |
|
184 | nt.assert_equal(os.path.join(HOME_TEST_DIR, ".cache", "ipython"), | |
185 | ipdir) |
|
185 | ipdir) | |
186 |
|
|
186 | assert_isdir(ipdir) | |
187 |
|
187 | |||
188 | # test env override |
|
188 | # test env override | |
189 | with modified_env({"XDG_CACHE_HOME": XDG_CACHE_DIR}): |
|
189 | with modified_env({"XDG_CACHE_HOME": XDG_CACHE_DIR}): | |
190 | ipdir = paths.get_ipython_cache_dir() |
|
190 | ipdir = paths.get_ipython_cache_dir() | |
191 |
|
|
191 | assert_isdir(ipdir) | |
192 | nt.assert_equal(ipdir, os.path.join(XDG_CACHE_DIR, "ipython")) |
|
192 | nt.assert_equal(ipdir, os.path.join(XDG_CACHE_DIR, "ipython")) | |
193 | else: |
|
193 | else: | |
194 | nt.assert_equal(paths.get_ipython_cache_dir(), |
|
194 | nt.assert_equal(paths.get_ipython_cache_dir(), | |
@@ -196,9 +196,9 b' def test_get_ipython_cache_dir():' | |||||
196 |
|
196 | |||
197 | def test_get_ipython_package_dir(): |
|
197 | def test_get_ipython_package_dir(): | |
198 | ipdir = paths.get_ipython_package_dir() |
|
198 | ipdir = paths.get_ipython_package_dir() | |
199 |
|
|
199 | assert_isdir(ipdir) | |
200 |
|
200 | |||
201 |
|
201 | |||
202 | def test_get_ipython_module_path(): |
|
202 | def test_get_ipython_module_path(): | |
203 | ipapp_path = paths.get_ipython_module_path('IPython.terminal.ipapp') |
|
203 | ipapp_path = paths.get_ipython_module_path('IPython.terminal.ipapp') | |
204 |
|
|
204 | assert_isfile(ipapp_path) |
General Comments 0
You need to be logged in to leave comments.
Login now