code: def test_repository_lightningignore(tmp_path):
      """LocalRepository.version uses the assumed checksum correctly."""
      # write .lightningignore file
      lightningignore = """
      # ignore files in this dir
      ignore/
  
      """
      (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").mkdir()
      (tmp_path / "ignore/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 5 for calling a global function with example usage: test_repository_lightningignore(tmp_path) without return types