Skip to content

Commit

Permalink
fix test to correctly use assumption of no comments in relationships
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
  • Loading branch information
lumjjb authored and armintaenzertng committed Aug 17, 2023
1 parent eab5db9 commit 32e3d2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def parse_document_describes(
def parse_has_files(
self, package_dicts: List[Dict], existing_relationships: List[Relationship]
) -> List[Relationship]:
# assume existing relationships are stripped of comments
logger = Logger()
contains_relationships = []
for package in package_dicts:
Expand Down
2 changes: 1 addition & 1 deletion tests/spdx/parser/jsonlikedict/test_relationship_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ def test_parse_has_files():
@pytest.mark.parametrize(
"has_files,existing_relationships,contains_relationships",
[
# pre-requisite for parse_has_files requires that comments in relationships are stripped
(
["SPDXRef-File1", "SPDXRef-File2"],
[
Relationship(
spdx_element_id="SPDXRef-Package",
relationship_type=RelationshipType.CONTAINS,
related_spdx_element_id="SPDXRef-File1",
comment="This relationship has a comment.",
),
Relationship(
spdx_element_id="SPDXRef-File2",
Expand Down

0 comments on commit 32e3d2d

Please sign in to comment.