From 26b7363f293141541ad7ec003a26a48b82392454 2021-10-08 09:48:36 From: Bibo Hao Date: 2021-10-08 09:48:36 Subject: [PATCH] update test case for writable folder --- diff --git a/IPython/core/tests/test_paths.py b/IPython/core/tests/test_paths.py index ab1c413..524a74d 100644 --- a/IPython/core/tests/test_paths.py +++ b/IPython/core/tests/test_paths.py @@ -160,6 +160,10 @@ def test_get_ipython_dir_7(): @skip_win32 def test_get_ipython_dir_8(): """test_get_ipython_dir_8, test / home directory""" + if not os.path.isdir('/') or not os.access('/', os.W_OK): + # test only when HOME directory actually writable + return + with patch.object(paths, '_writable_dir', lambda path: bool(path)), \ patch.object(paths, 'get_xdg_dir', return_value=None), \ modified_env({