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

Function test_get_xdg_dir_0

IPython/utils/tests/test_path.py:187–198  ·  view source on GitHub ↗

test_get_xdg_dir_0, check xdg_dir

()

Source from the content-addressed store, hash-verified

185
186@with_environment
187def test_get_xdg_dir_0():
188 """test_get_xdg_dir_0, check xdg_dir"""
189 reload(path)
190 path._writable_dir = lambda path: True
191 path.get_home_dir = lambda : 'somewhere'
192 os.name = "posix"
193 sys.platform = "linux2"
194 env.pop('IPYTHON_DIR', None)
195 env.pop('IPYTHONDIR', None)
196 env.pop('XDG_CONFIG_HOME', None)
197
198 nt.assert_equal(path.get_xdg_dir(), os.path.join('somewhere', '.config'))
199
200
201@with_environment

Callers

nothing calls this directly

Calls 2

reloadFunction · 0.85
popMethod · 0.80

Tested by

no test coverage detected