code: def test_repository_filters_with_absolute_relative_path(tmp_path):
      """.lightningignore parsing parses paths starting with / correctly."""
      lightningignore = """
      /ignore_file/test.txt
  
      /ignore_dir
      """
      (tmp_path / ".lightningignore").write_text(lightningignore)
      (tmp_path / "test.txt").write_text("test")
  
      repository = LocalSourceCodeDir(path=Path(tmp_path))
  
      assert set(repository.files) == {
          str(tmp_path / ".lightningignore"),
          str(tmp_path / "test.txt"),
      }
  
      # write file that needs to be ignored
      (tmp_path / "ignore_file").mkdir()
      (tmp_path / "ignore_dir").mkdir()
      (tmp_path / "ignore_file/test.txt").write_text(str(uuid.uuid4()))
      (tmp_path / "ignore_dir/test.txt").write_text(str(uuid.uuid4()))
  
      repository = LocalSourceCodeDir(path=Path(tmp_path))
  
      assert set(repository.files) == {
          str(tmp_path / ".lightningignore"),
          str(tmp_path / "test.txt"),
      }
  
file_path: pytorch-lightning/tests/tests_app/source_code/test_local.py
imports: import os
  import sys
  import tarfile
  import uuid
  from pathlib import Path
  from unittest import mock
  import pytest
  from lightning.app.source_code import LocalSourceCodeDir
label_desc: Use image node_id 6 for calling a global function with example usage: test_repository_filters_with_absolute_relative_path(tmp_path) without return types