code: def test_paths_with_forward_slashes(path=None):
      # access file with native absolute path spec
      print(path)
      ok_file_has_content(
          op.join(path, "subdir", "testfile"), "testcontent"
      )
      with chpwd(path):
          # native relative path spec
          ok_file_has_content(
              op.join("subdir", "testfile"), "testcontent"
          )
          # posix relative path spec
          ok_file_has_content("subdir/testfile", "testcontent")
      # abspath with forward slash path sep char
      ok_file_has_content(
          op.join(path, "subdir", "testfile").replace(op.sep, "/"),
          "testcontent",
      )
  
file_path: datalad/datalad/tests/test_base.py
imports: import os
  import os.path
  import sys
  from unittest.mock import patch
  from datalad.cmd import WitlessRunner, StdOutErrCapture
  from datalad.tests.utils_pytest import SkipTest, assert_in, assert_raises, chpwd, get_dataset_root, ok_file_has_content, swallow_logs, with_tree
  from datalad.utils import get_home_envvars
label_desc: Use image node_id 1 for calling a global function with example usage: test_paths_with_forward_slashes(path) without return types