Skip to content

Commit

Permalink
Merge pull request ipython#2022 from minrk/gentoo_bad
Browse files Browse the repository at this point in the history
Don't check writability in test for get_home_dir when HOME is undefined

Some pathological environments such as gentoo sandboxes can give invalid results.

The code path is at least executed, but no values are checked.

closes ipython#1998
  • Loading branch information
fperez committed Jun 24, 2012
2 parents 3c2ce20 + 405e48d commit 7d189da
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions IPython/utils/tests/test_path.py
Expand Up @@ -159,9 +159,8 @@ def test_get_home_dir_4():
"""get_home_dir() still works if $HOME is not set"""

if 'HOME' in env: del env['HOME']
# this should still succeed, but we don't know what the answer should be
home = path.get_home_dir(True)
nt.assert_true(path._writable_dir(home))
# this should still succeed, but we don't care what the answer is
home = path.get_home_dir(False)

@with_environment
def test_get_home_dir_5():
Expand Down

0 comments on commit 7d189da

Please sign in to comment.