allow default language_version of system when homedir is /

This commit is contained in:
Anthony Sottile 2020-10-28 22:56:10 -07:00
parent 711248f678
commit 62b8d0ed82
2 changed files with 14 additions and 2 deletions

View file

@ -55,6 +55,12 @@ def test_exe_exists_commonpath_raises_ValueError(find_exe_mck, homedir_mck):
assert helpers.exe_exists('ruby') is True
def test_exe_exists_true_when_homedir_is_slash(find_exe_mck):
find_exe_mck.return_value = os.path.normpath('/usr/bin/ruby')
with mock.patch.object(os.path, 'expanduser', return_value=os.sep):
assert helpers.exe_exists('ruby') is True
def test_basic_get_default_version():
assert helpers.basic_get_default_version() == C.DEFAULT