def test_initial_refresh_from_good_relative_git_path_env(self):
        """Good initial relative path from environment is kept relative and set."""
        with _rollback_refresh():
            # Set the fallback to a string that wouldn't work and isn't "git", so we are
            # more likely to detect if "git" is not set from the environment variable.
            with mock.patch.object(Git, "git_exec_name", ""):
                Git.GIT_PYTHON_GIT_EXECUTABLE = None  # Simulate startup.

                # Now observe if setting the environment variable to "git" takes effect.
                with mock.patch.dict(os.environ, {"GIT_PYTHON_GIT_EXECUTABLE": "git"}):
                    refresh()
                    self.assertEqual(self.git.GIT_PYTHON_GIT_EXECUTABLE, "git")
Good initial relative path from environment is kept relative and set.
test/test_git.py