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