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

Function test_get_ipython_dir_2

IPython/core/tests/test_paths.py:57–69  ·  view source on GitHub ↗

test_get_ipython_dir_2, Testcase to see if we can call get_ipython_dir without Exceptions.

()

Source from the content-addressed store, hash-verified

55 nt.assert_equal(ipdir, env_ipdir)
56
57def test_get_ipython_dir_2():
58 """test_get_ipython_dir_2, Testcase to see if we can call get_ipython_dir without Exceptions."""
59 with patch_get_home_dir('someplace'), \
60 patch.object(paths, 'get_xdg_dir', return_value=None), \
61 patch.object(paths, '_writable_dir', return_value=True), \
62 patch('os.name', "posix"), \
63 modified_env({'IPYTHON_DIR': None,
64 'IPYTHONDIR': None,
65 'XDG_CONFIG_HOME': None
66 }):
67 ipdir = paths.get_ipython_dir()
68
69 nt.assert_equal(ipdir, os.path.join("someplace", ".ipython"))
70
71def test_get_ipython_dir_3():
72 """test_get_ipython_dir_3, move XDG if defined, and .ipython doesn't exist."""

Callers

nothing calls this directly

Calls 1

patch_get_home_dirFunction · 0.85

Tested by

no test coverage detected