Skip to content

Commit

Permalink
Revert two test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
  • Loading branch information
carmenbianca committed Jun 21, 2023
1 parent 4cb5a77 commit 12790fd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
29 changes: 0 additions & 29 deletions tests/test_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,33 +191,4 @@ def test_lint_json_output(fake_repository):
)


def test_lint_json_output_precedence(fake_repository):
"""Test for lint with JSON output with focus on precedence."""
(fake_repository / "doc/differently_licensed_docs.rst").write_text(
"SPDX-License-Identifier: MIT"
)
project = Project(fake_repository)
report = ProjectReport.generate(project)

json_result = report.to_dict_lint()

assert json_result
# Test result
assert json_result["summary"]["compliant"] is False
# Test license path precedence
for test_file in json_result["files"]:
if test_file["path"].startswith(
str(fake_repository / "doc/differently_licensed_docs.rst")
):
assert test_file["licenses"][0]["value"] == "MIT"
assert test_file["licenses"][0]["source"] == str(
fake_repository / "doc/differently_licensed_docs.rst"
)
if test_file["path"].startswith(str(fake_repository / "doc/index.rst")):
assert test_file["licenses"][0]["value"] == "CC0-1.0"
assert test_file["licenses"][0]["source"] == str(
fake_repository / ".reuse/dep5"
)


# REUSE-IgnoreEnd
14 changes: 0 additions & 14 deletions tests/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,20 +247,6 @@ def test_reuse_info_of_only_copyright(fake_repository):
)


def test_reuse_info_of_only_copyright_also_covered_by_debian(fake_repository):
"""A file contains only a copyright line, but debian/copyright also has
information on this file. Use only the information from file header.
"""
(fake_repository / "doc/foo.py").write_text(
"SPDX-FileCopyrightText: in file"
)
project = Project(fake_repository)
reuse_info = project.reuse_info_of("doc/foo.py")

assert len(reuse_info.copyright_lines) == 1
assert "SPDX-FileCopyrightText: in file" in reuse_info.copyright_lines


def test_reuse_info_of_also_covered_by_dep5(fake_repository):
"""A file contains all REUSE information, but .reuse/dep5 also
provides information on this file. Aggregate the information (for now), and
Expand Down

0 comments on commit 12790fd

Please sign in to comment.