##// END OF EJS Templates
Merge pull request #13201 from meeseeksmachine/auto-backport-of-pr-13181-on-7.x...
Matthias Bussonnier -
r26872:30f57c97 merge
parent child Browse files
Show More
@@ -160,6 +160,10 b' def test_get_ipython_dir_7():'
160 @skip_win32
160 @skip_win32
161 def test_get_ipython_dir_8():
161 def test_get_ipython_dir_8():
162 """test_get_ipython_dir_8, test / home directory"""
162 """test_get_ipython_dir_8, test / home directory"""
163 if not os.access("/", os.W_OK):
164 # test only when HOME directory actually writable
165 return
166
163 with patch.object(paths, '_writable_dir', lambda path: bool(path)), \
167 with patch.object(paths, '_writable_dir', lambda path: bool(path)), \
164 patch.object(paths, 'get_xdg_dir', return_value=None), \
168 patch.object(paths, 'get_xdg_dir', return_value=None), \
165 modified_env({
169 modified_env({
@@ -66,6 +66,8 b' def get_ipython_dir() -> str:'
66 warn("IPython parent '{0}' is not a writable location,"
66 warn("IPython parent '{0}' is not a writable location,"
67 " using a temp directory.".format(parent))
67 " using a temp directory.".format(parent))
68 ipdir = tempfile.mkdtemp()
68 ipdir = tempfile.mkdtemp()
69 else:
70 os.makedirs(ipdir)
69 assert isinstance(ipdir, str), "all path manipulation should be str(unicode), but are not."
71 assert isinstance(ipdir, str), "all path manipulation should be str(unicode), but are not."
70 return ipdir
72 return ipdir
71
73
General Comments 0
You need to be logged in to leave comments. Login now