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

Function test_get_ipython_dir_5

IPython/core/tests/test_paths.py:114–131  ·  view source on GitHub ↗

test_get_ipython_dir_5, use .ipython if exists and XDG defined, but doesn't exist.

()

Source from the content-addressed store, hash-verified

112 nt.assert_in('Ignoring', str(w[0]))
113
114def test_get_ipython_dir_5():
115 """test_get_ipython_dir_5, use .ipython if exists and XDG defined, but doesn't exist."""
116 with patch_get_home_dir(HOME_TEST_DIR), \
117 patch('os.name', 'posix'):
118 try:
119 os.rmdir(os.path.join(XDG_TEST_DIR, 'ipython'))
120 except OSError as e:
121 if e.errno != errno.ENOENT:
122 raise
123
124 with modified_env({
125 'IPYTHON_DIR': None,
126 'IPYTHONDIR': None,
127 'XDG_CONFIG_HOME': XDG_TEST_DIR,
128 }):
129 ipdir = paths.get_ipython_dir()
130
131 nt.assert_equal(ipdir, IP_TEST_DIR)
132
133def test_get_ipython_dir_6():
134 """test_get_ipython_dir_6, use home over XDG if defined and neither exist."""

Callers

nothing calls this directly

Calls 1

patch_get_home_dirFunction · 0.85

Tested by

no test coverage detected