Skip to content

Commit

Permalink
[issue-754] output FilesAnalyzed boolean in lowercase in tag-value
Browse files Browse the repository at this point in the history
Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
  • Loading branch information
armintaenzertng committed Sep 14, 2023
1 parent 44196ef commit b97cba3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/spdx_tools/spdx/writer/tagvalue/package_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def write_package(package: Package, text_output: TextIO):
write_actor("PackageOriginator", package.originator, text_output)
write_value("PackageDownloadLocation", package.download_location, text_output)

write_value("FilesAnalyzed", package.files_analyzed, text_output)
write_value("FilesAnalyzed", str(package.files_analyzed).lower(), text_output)
if package.verification_code:
package_verification_code = get_package_verification_code_string(package.verification_code)
write_value("PackageVerificationCode", package_verification_code, text_output)
Expand Down
2 changes: 1 addition & 1 deletion tests/spdx/writer/tagvalue/test_package_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_package_writer():
call(f"PackageSupplier: Person: {package.supplier.name} ({package.supplier.email})\n"),
call(f"PackageOriginator: Person: {package.originator.name} ({package.originator.email})\n"),
call(f"PackageDownloadLocation: {package.download_location}\n"),
call("FilesAnalyzed: True\n"),
call("FilesAnalyzed: true\n"),
call(f"PackageVerificationCode: {package.verification_code.value} (excludes: ./exclude.py)\n"),
call("PackageChecksum: SHA1: 71c4025dd9897b364f3ebbb42c484ff43d00791c\n"),
call(f"PackageHomePage: {package.homepage}\n"),
Expand Down
8 changes: 4 additions & 4 deletions tests/spdx/writer/tagvalue/test_tagvalue_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_correct_order_of_elements():
call("PackageName: Test Package A\n"),
call("SPDXID: SPDXRef-Package-A\n"),
call("PackageDownloadLocation: \n"),
call("FilesAnalyzed: True\n"),
call("FilesAnalyzed: true\n"),
call("\n"),
call("## File Information\n"),
call("FileName: Test File B\n"),
Expand All @@ -130,7 +130,7 @@ def test_correct_order_of_elements():
call("PackageName: Test Package B\n"),
call("SPDXID: SPDXRef-Package-B\n"),
call("PackageDownloadLocation: \n"),
call("FilesAnalyzed: True\n"),
call("FilesAnalyzed: true\n"),
call("\n"),
call("\n"),
]
Expand Down Expand Up @@ -199,7 +199,7 @@ def test_same_file_in_multiple_packages():
call("PackageName: Example package A\n"),
call("SPDXID: SPDXRef-Package-A\n"),
call("PackageDownloadLocation: https://download.com\n"),
call("FilesAnalyzed: True\n"),
call("FilesAnalyzed: true\n"),
call("\n"),
call("## File Information\n"),
call("FileName: Example file\n"),
Expand All @@ -210,7 +210,7 @@ def test_same_file_in_multiple_packages():
call("PackageName: Example package B\n"),
call("SPDXID: SPDXRef-Package-B\n"),
call("PackageDownloadLocation: https://download.com\n"),
call("FilesAnalyzed: True\n"),
call("FilesAnalyzed: true\n"),
call("\n"),
call("## Relationships\n"),
call("Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-Package-A\n"),
Expand Down

0 comments on commit b97cba3

Please sign in to comment.