def test_local_appdata_matches_environment(self): # LOCALAPPDATA typically only exists on Vista, so we only attempt to # compare when it exists. lad = win32utils.get_local_appdata_location() env = os.environ.get("LOCALAPPDATA") if env: # XXX - See bug 262874, which asserts the correct encoding is 'mbcs' encoding = osutils.get_user_encoding() self.assertPathsEqual(lad, env.decode(encoding))
def test_local_appdata_not_using_environment(self): # Test that we aren't falling back to the environment first = win32utils.get_local_appdata_location() self.overrideEnv("LOCALAPPDATA", None) self.assertPathsEqual(first, win32utils.get_local_appdata_location())