code: def test_robust_abspath(tdir=None):
      with chpwd(tdir):
          eq_(robust_abspath(curdir), tdir)
          try:
              if os.environ.get("DATALAD_ASSERT_NO_OPEN_FILES"):
                  raise Exception("cannot test under such pressure")
              rmtree(tdir)
          except Exception as exc:
              # probably windows or above exception
              raise SkipTest(
                  "Cannot test in current environment"
              ) from exc
  
          assert_raises(OSError, abspath, curdir)
          eq_(robust_abspath(curdir), tdir)
  
file_path: datalad/datalad/support/tests/test_path.py
imports: import os
  from pathlib import PurePosixPath
  from ...tests.utils_pytest import SkipTest, assert_raises, eq_, with_tempfile
  from ...utils import chpwd, on_windows, rmtree
  from ..path import abspath, curdir, get_parent_paths, get_filtered_paths_, robust_abspath, split_ext
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_robust_abspath(tdir) without return types