MCPcopy Index your code
hub / github.com/ipython/ipython / test_get_xdg_dir_0

Function test_get_xdg_dir_0

tests/test_path.py:210–220  ·  view source on GitHub ↗

test_get_xdg_dir_0, check xdg_dir

(monkeypatch)

Source from the content-addressed store, hash-verified

208
209@with_environment
210def test_get_xdg_dir_0(monkeypatch):
211 """test_get_xdg_dir_0, check xdg_dir"""
212 monkeypatch.setattr(path, "_writable_dir", lambda path: True)
213 monkeypatch.setattr(path, "get_home_dir", lambda: "somewhere")
214 monkeypatch.setattr(os, "name", "posix")
215 monkeypatch.setattr(sys, "platform", "linux2")
216 env.pop("IPYTHON_DIR", None)
217 env.pop("IPYTHONDIR", None)
218 env.pop("XDG_CONFIG_HOME", None)
219
220 assert path.get_xdg_dir() == os.path.join("somewhere", ".config")
221
222
223@with_environment

Callers

nothing calls this directly

Calls 1

popMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…