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({ |
@@ -71,6 +71,8 b' def get_ipython_dir() -> str:' | |||||
71 | warn("IPython parent '{0}' is not a writable location," |
|
71 | warn("IPython parent '{0}' is not a writable location," | |
72 | " using a temp directory.".format(parent)) |
|
72 | " using a temp directory.".format(parent)) | |
73 | ipdir = tempfile.mkdtemp() |
|
73 | ipdir = tempfile.mkdtemp() | |
|
74 | else: | |||
|
75 | os.makedirs(ipdir) | |||
74 | assert isinstance(ipdir, str), "all path manipulation should be str(unicode), but are not." |
|
76 | assert isinstance(ipdir, str), "all path manipulation should be str(unicode), but are not." | |
75 | return ipdir |
|
77 | return ipdir | |
76 |
|
78 |
General Comments 0
You need to be logged in to leave comments.
Login now