code: def test_subds_status(path=None):
      ds = Dataset(path).create()
      subds = ds.create("subds")
      assert_repo_status(ds.path)
      subds.create("someotherds")
      assert_repo_status(subds.path)
      assert_repo_status(ds.path, modified=["subds"])
      assert_result_count(
          ds.status(path="subds", result_renderer="disabled"),
          1,
          # must be modified, not added (ds was clean after it was added)
          state="modified",
          type="dataset",
          path=subds.path,
          refds=ds.path,
      )
  
      # path="." gets treated as "this dataset's content" without requiring a
      # trailing "/"...
      assert_result_count(
          subds.status(path=".", result_renderer="disabled"),
          1,
          type="dataset",
          path=op.join(subds.path, "someotherds"),
          refds=subds.path,
      )
  
      # ... and so does path=<path/to/ds>.
      assert_result_count(
          subds.status(path=subds.path, result_renderer="disabled"),
          1,
          type="dataset",
          path=op.join(subds.path, "someotherds"),
          refds=subds.path,
      )
  
      assert_result_count(
          subds.status(
              path=op.join(subds.path, op.pardir, "subds"),
              result_renderer="disabled",
          ),
          1,
          type="dataset",
          path=op.join(subds.path, "someotherds"),
          refds=subds.path,
      )
  
      assert_result_count(
          subds.status(
              path=op.join(subds.path, op.curdir),
              result_renderer="disabled",
          ),
          1,
          type="dataset",
          path=op.join(subds.path, "someotherds"),
          refds=subds.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 6 for calling a global function with example usage: test_subds_status(path) without return types