code: def test_cmd_remove(tmp_dir, dvc):
      assert main(["remove", "non-existing-dvc-file"]) == 1
  
      (stage,) = tmp_dir.dvc_gen("foo", "foo")
      assert main(["remove", stage.addressing]) == 0
      assert not (tmp_dir / stage.relpath).exists()
      assert (tmp_dir / "foo").exists()
  
      (stage,) = tmp_dir.dvc_gen("foo", "foo")
      assert main(["remove", stage.addressing, "--outs"]) == 0
      assert not (tmp_dir / stage.relpath).exists()
      assert not (tmp_dir / "foo").exists()
  
file_path: dvc/tests/func/test_remove.py
imports: import os
  import pytest
  from dvc.cli import main
  from dvc.fs import system
  from dvc.stage.exceptions import StageFileDoesNotExistError, StageFileIsNotDvcFileError
  from dvc.utils.fs import remove
  from dvc_objects.errors import ObjectDBError
  from tests.utils import get_gitignore_content
label_desc: Use image node_id 5 for calling a global function with example usage: test_cmd_remove(tmp_dir, dvc) without return types