code: def test_on_revision(
      tmp_dir,
      scm,
      dvc,
      force_posixpath,
      fixed_width_term,
      capsys,
      text,
      expected,
  ):
      tmp_dir.scm_gen("dvc.yaml", text, commit="add dvc.yaml")
      capsys.readouterr()  # clear outputs
  
      assert (
          main(["ls", f"file://{tmp_dir.as_posix()}", "--rev", "HEAD"])
          != 0
      )
  
      out, err = capsys.readouterr()
      assert not out
      assert expected.format(short_rev=scm.get_rev()[:7]) in err
  
file_path: dvc/tests/func/utils/test_strict_yaml.py
imports: import os
  import pytest
  from ruamel.yaml import __with_libyaml__
  from dvc.cli import main
label_desc: Use image node_id 4 for calling a global function with example usage: test_on_revision(tmp_dir, scm, dvc, force_posixpath, fixed_width_term, capsys, text, expected) without return types