docstr: Set up CLI as in `src/huggingface_hub/commands/huggingface_cli.py`.
docstr_tok: ["Set","up","CLI","as","in","`","src\/huggingface_hub\/commands\/huggingface_cli.py","`","."]
code: def setUp(self) -> None:
      """
      Set up CLI as in `src/huggingface_hub/commands/huggingface_cli.py`.
      """
      self.parser = ArgumentParser(
          "huggingface-cli", usage="huggingface-cli <command> [<args>]"
      )
      commands_parser = self.parser.add_subparsers()
      DownloadCommand.register_subcommand(commands_parser)
  
imports: import os
  import unittest
  import warnings
  from argparse import ArgumentParser, Namespace
  from contextlib import contextmanager
  from pathlib import Path
  from typing import Generator
  from unittest.mock import Mock, patch
  from huggingface_hub.commands.delete_cache import DeleteCacheCommand
  from huggingface_hub.commands.download import DownloadCommand
  from huggingface_hub.commands.scan_cache import ScanCacheCommand
  from huggingface_hub.commands.upload import UploadCommand
  from huggingface_hub.utils import RevisionNotFoundError, SoftTemporaryDirectory, capture_output
  from .testing_utils import DUMMY_MODEL_ID
label_desc: Use image node_id 1 for calling the TestDownloadCommand obj's underlying member method code with example usage: obj.setUp() without return types