code: def test_status_basics(path=None, linkpath=None, otherdir=None):
      if has_symlink_capability():
          # make it more complicated by default
          ut.Path(linkpath).symlink_to(path, target_is_directory=True)
          path = linkpath
  
      with chpwd(path):
          assert_raises(NoDatasetFound, status)
      ds = Dataset(path).create()
      # outcome identical between ds= and auto-discovery
      with chpwd(path):
          assert_raises(IncompleteResultsError, status, path=otherdir)
          stat = status(result_renderer="disabled")
      eq_(stat, ds.status(result_renderer="disabled"))
      assert_status("ok", stat)
      # we have a bunch of reports (be vague to be robust to future changes
      assert len(stat) > 2
      # check the composition
      for s in stat:
          eq_(s["status"], "ok")
          eq_(s["action"], "status")
          eq_(s["state"], "clean")
          eq_(s["type"], "file")
          assert_in("gitshasum", s)
          assert_in("bytesize", s)
          eq_(s["refds"], ds.path)
  
file_path: datalad/datalad/core/local/tests/test_status.py
imports: import os.path
  import datalad.utils
  from datalad.api import status
  from datalad.core.local.status import get_paths_by_ds
  from datalad.distribution.dataset import Dataset
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import CommandError, IncompleteResultsError, NoDatasetFound
  from datalad.tests.utils_pytest import OBSCURE_FILENAME, SkipTest, assert_dict_equal, assert_in, assert_in_results, assert_not_in_results, assert_raises, assert_repo_status, assert_result_count, assert_status, eq_, get_deeply_nested_structure, has_symlink_capability, with_tempfile
  from datalad.utils import chpwd, on_windows
label_desc: Use image node_id 2 for calling a global function with example usage: test_status_basics(path, linkpath, otherdir) without return types