@skip_if_not_win32
@with_environment
def test_get_home_dir_8():
 os.name = 'nt'
 for key in ['HOME', 'HOMESHARE', 'HOMEDRIVE', 'HOMEPATH', 'USERPROFILE']:
  env.pop(key, None)
 class key:
  def Close(self):
   pass
 with patch.object(wreg, 'OpenKey', return_value=key()):
  with patch.object(wreg, 'QueryValueEx', return_value=[abspath(HOME_TEST_DIR)]):
   home_dir = path.get_home_dir()
 nt.assert_equal(home_dir, abspath(HOME_TEST_DIR))

@ skip_if_not_win32 @ with_environment def test_get_home_dir_8 ( ) : os . name = 'nt' for key in [ 'HOME' , 'HOMESHARE' , 'HOMEDRIVE' , 'HOMEPATH' , 'USERPROFILE' ] : env . pop ( key , None ) class key : def Close ( self ) : pass with patch . object ( wreg , 'OpenKey' , return_value = key ( ) ) : with patch . object ( wreg , 'QueryValueEx' , return_value = [ abspath ( HOME_TEST_DIR ) ] ) : home_dir = path . get_home_dir ( ) nt . assert_equal ( home_dir , abspath ( HOME_TEST_DIR ) )
using registry hack for my documents .