def test_cmd_override(self):
        """Directly set bad GIT_PYTHON_GIT_EXECUTABLE causes git operations to raise."""
        bad_path = osp.join("some", "path", "which", "doesn't", "exist", "gitbinary")
        with mock.patch.object(Git, "GIT_PYTHON_GIT_EXECUTABLE", bad_path):
            with self.assertRaises(GitCommandNotFound) as ctx:
                self.git.version()
            self.assertEqual(ctx.exception.command, [bad_path, "version"])
Directly set bad GIT_PYTHON_GIT_EXECUTABLE causes git operations to raise.
test/test_git.py