test_get_ipython_dir_5, use .ipython if exists and XDG defined, but doesn't exist.
()
| 112 | nt.assert_in('Ignoring', str(w[0])) |
| 113 | |
| 114 | def 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 | |
| 133 | def test_get_ipython_dir_6(): |
| 134 | """test_get_ipython_dir_6, use home over XDG if defined and neither exist.""" |
nothing calls this directly
no test coverage detected