def METHOD_NAME(self, tmp_path: Path) -> None:
    """Test __init__ gitignore_filter provided."""
    gitignore_filter = Mock()
    obj = SourceCode(
        tmp_path,
        gitignore_filter=gitignore_filter,
        include_files_in_hash=[tmp_path],
    )
    assert obj._include_files_in_hash == [tmp_path]
    assert obj.gitignore_filter == gitignore_filter
    gitignore_filter.parse_rule_files.assert_not_called()
    gitignore_filter.add_rule.assert_not_called()