MCPcopy Create free account
hub / github.com/ipython/ipython / test_get_xdg_dir_2

Function test_get_xdg_dir_2

IPython/utils/tests/test_path.py:214–227  ·  view source on GitHub ↗

test_get_xdg_dir_2, check xdg_dir default to ~/.config

()

Source from the content-addressed store, hash-verified

212
213@with_environment
214def test_get_xdg_dir_2():
215 """test_get_xdg_dir_2, check xdg_dir default to ~/.config"""
216 reload(path)
217 path.get_home_dir = lambda : HOME_TEST_DIR
218 os.name = "posix"
219 sys.platform = "linux2"
220 env.pop('IPYTHON_DIR', None)
221 env.pop('IPYTHONDIR', None)
222 env.pop('XDG_CONFIG_HOME', None)
223 cfgdir=os.path.join(path.get_home_dir(), '.config')
224 if not os.path.exists(cfgdir):
225 os.makedirs(cfgdir)
226
227 nt.assert_equal(path.get_xdg_dir(), cfgdir)
228
229@with_environment
230def test_get_xdg_dir_3():

Callers

nothing calls this directly

Calls 2

reloadFunction · 0.85
popMethod · 0.80

Tested by

no test coverage detected