code: def test_show_hash(mocker, capsys, dvc):
      args = parse_args(["diff", "--show-hash"])
      cmd = args.func(args)
      diff = {
          "added": [],
          "deleted": [
              {
                  "path": os.path.join("data", ""),
                  "hash": "XXXXXXXX.dir",
              },
              {"path": os.path.join("data", "foo"), "hash": "11111111"},
              {"path": os.path.join("data", "bar"), "hash": "00000000"},
          ],
          "modified": [
              {
                  "path": "file2",
                  "hash": {"old": "AAAAAAAA", "new": "BBBBBBBB"},
              },
              {
                  "path": "file1",
                  "hash": {"old": "CCCCCCCC", "new": "DDDDDDDD"},
              },
          ],
          "renamed": [
              {
                  "path": {
                      "old": os.path.join("data", "file_old"),
                      "new": os.path.join("data", "file_new"),
                  },
                  "hash": "11111111",
              }
          ],
          "not in cache": [],
      }
      mocker.patch("dvc.repo.Repo.diff", return_value=diff)
      assert cmd.run() == 0
  
      out, _ = capsys.readouterr()
      assert (
          "Deleted:\n    XXXXXXXX  "
          + os.path.join("data", "")
          + "\n    00000000  "
          + os.path.join("data", "bar")
          + "\n    11111111  "
          + os.path.join("data", "foo")
          + "\n\nRenamed:\n    11111111  "
          + os.path.join("data", "file_old")
          + " -> "
          + os.path.join("data", "file_new")
          + "\n"
          "\n"
          "Modified:\n"
          "    CCCCCCCC..DDDDDDDD  file1\n"
          "    AAAAAAAA..BBBBBBBB  file2\n"
          "\n"
          "files summary: 2 deleted, 1 renamed, 2 modified"
      ) in out
  
file_path: dvc/tests/unit/command/test_diff.py
imports: import collections
  import os
  import pytest
  from dvc.cli import parse_args
  from dvc.commands.diff import _digest, _show_markdown
label_desc: Use image node_id 3 for calling a global function with example usage: test_show_hash(mocker, capsys, dvc) without return types