Skip to content

Commit

Permalink
Licensing header is not needed in REUSE.toml
Browse files Browse the repository at this point in the history
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
  • Loading branch information
carmenbianca committed Jul 8, 2024
1 parent cc63716 commit 4089373
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/reuse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
re.compile(r"^\.gitkeep$"),
re.compile(r"^\.hgtags$"),
re.compile(r".*\.license$"),
re.compile(r"^REUSE\.toml$"),
# Workaround for https://github.com/fsfe/reuse-tool/issues/229
re.compile(r"^CAL-1.0(-Combined-Work-Exception)?(\..+)?$"),
re.compile(r"^SHL-2.1(\..+)?$"),
Expand Down
4 changes: 0 additions & 4 deletions tests/resources/REUSE.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# SPDX-FileCopyrightText: 2017 Jane Doe
#
# SPDX-License-Identifier: CC0-1.0

version = 1

[[annotations]]
Expand Down
7 changes: 7 additions & 0 deletions tests/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,13 @@ def test_all_files_pijul_ignored_contains_newline(pijul_repository):
assert Path("hello\nworld.pyc").absolute() not in project.all_files()


def test_all_files_reuse_toml_ignored(empty_directory):
"""REUSE.toml is ignored."""
(empty_directory / "REUSE.toml").write_text("version = 1")
project = Project.from_directory(empty_directory)
assert not list(project.all_files())


def test_reuse_info_of_file_does_not_exist(fake_repository):
"""Raise FileNotFoundError when asking for the REUSE info of a file that
does not exist.
Expand Down

0 comments on commit 4089373

Please sign in to comment.