@@ -198,9 +198,11 @@ def test_jupyter_path():
198
198
def test_jupyter_path_user_site ():
199
199
with no_config_env , patch .object (site , 'ENABLE_USER_SITE' , True ):
200
200
path = jupyter_path ()
201
- assert path [0 ] == jupyter_data_dir ()
202
- assert path [1 ] == os .path .join (site .getuserbase (), 'share' , 'jupyter' )
203
- assert path [2 ] == paths .ENV_JUPYTER_PATH [0 ]
201
+ sitedir = os .path .join (site .getuserbase (), 'share' , 'jupyter' )
202
+ assert path .pop (0 ) == jupyter_data_dir ()
203
+ if jupyter_data_dir () != sitedir :
204
+ assert path .pop (0 ) == sitedir
205
+ assert path .pop (0 ) == paths .ENV_JUPYTER_PATH [0 ]
204
206
205
207
def test_jupyter_path_no_user_site ():
206
208
with no_config_env , patch .object (site , 'ENABLE_USER_SITE' , False ):
@@ -239,9 +241,11 @@ def test_jupyter_path_subdir():
239
241
def test_jupyter_config_path ():
240
242
with patch .object (site , 'ENABLE_USER_SITE' , True ):
241
243
path = jupyter_config_path ()
242
- assert path [0 ] == jupyter_config_dir ()
243
- assert path [1 ] == os .path .join (site .USER_BASE , 'etc' , 'jupyter' )
244
- assert path [2 ] == paths .ENV_CONFIG_PATH [0 ]
244
+ sitedir = os .path .join (site .USER_BASE , 'etc' , 'jupyter' )
245
+ assert path .pop (0 ) == jupyter_config_dir ()
246
+ if jupyter_config_dir () != sitedir :
247
+ assert path .pop (0 ) == sitedir
248
+ assert path .pop (0 ) == paths .ENV_CONFIG_PATH [0 ]
245
249
246
250
def test_jupyter_config_path_no_user_site ():
247
251
with patch .object (site , 'ENABLE_USER_SITE' , False ):
0 commit comments