Skip to content

test: Improve Test Coverage for package_list_parser.py #4875

Closed
@JigyasuRajput

Description

@JigyasuRajput

Description:

cve_bin_tool/package_list_parser.py lacks sufficient test coverage.

Functions Needing Tests:

  1. parse_list(self) ~ report

    • Parses package lists from different package managers (dpkg, rpm, pacman, pip).
    • Needs tests for different distributions, missing packages, and JSON output parsing.
  2. add_vendor(self, vendor_package_pairs) ~ report

    • Associates vendors with package names using CVE database data.
    • Needs tests for vendor matching and edge cases where no vendor is found.
  3. parse_data(self) ~ report

    • Converts parsed package data into structured output.
    • Needs tests for handling missing or malformed data.
  4. check_file(self) ~ report

    • Validates the package list file before parsing.
    • Needs tests for handling missing files, incorrect formats, and invalid package lists.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions