8000 [review] add explanation for tests · spdx/tools-python@b5374ad · GitHub
[go: up one dir, main page]

Skip to content
10000

Commit b5374ad

Browse files
committed
[review] add explanation for tests
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
1 parent 5a72c4a commit b5374ad

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/spdx/parser/rdf/test_extracted_licensing_info_parser.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,16 @@
1818

1919

2020
@pytest.mark.parametrize(
21-
"parent_node_object, license_id, extracted_text, comment, license_name, cross_references",
21+
"license_id, extracted_text, comment, license_name, cross_references",
2222
[
2323
(
24-
SPDX_NAMESPACE.SpdxDocument,
2524
"LicenseRef-1",
2625
"extractedText",
2726
"licenseComment",
2827
"licenseName",
2928
["https://see.also"],
3029
),
3130
(
32-
SPDX_NAMESPACE.Package,
3331
"LicenseRef-2",
3432
"extractedText",
3533
"licenseComment",
@@ -38,9 +36,11 @@
3836
),
3937
],
4038
)
41-
def test_parse_extracted_licensing_info(
42-
parent_node_object, license_id, extracted_text, comment, license_name, cross_references
43-
):
39+
# In rdf, as a short form, the explicit node for licenseId can be omitted, since the ID is also encoded in the URIRef
40+
# of the ExtractedLicensingInfo node. The first test case has an explicit licenseId node whereas the second test case
41+
# does not. This behaviour is similar to the externalDocumentRefId, see the discussion here:
42+
# https://github.com/spdx/spdx-spec/issues/816
43+
def test_parse_extracted_licensing_info(license_id, extracted_text, comment, license_name, cross_references):
4444
graph = Graph().parse(os.path.join(os.path.dirname(__file__), "data/file_to_test_rdf_parser.rdf.xml"))
4545
doc_namespace = "https://some.namespace"
4646
extracted_licensing_info_node = get_extracted_licensing_info_node_by_license_id(graph, license_id)

0 commit comments

Comments
 (0)
0