Skip to content

Commit

Permalink
Fix failing tests, clean merged code as needed #65
Browse files Browse the repository at this point in the history
Reference:

Signed-off-by: John M. Horan <[email protected]>
  • Loading branch information
johnmhoran committed Jun 8, 2024
1 parent d4d50f7 commit 70e5632
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
4 changes: 0 additions & 4 deletions purldb-toolkit/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ This command collects and return a list of all the known versions of a PURL by q
and upstream package registries as needed.


This command collects and return a list of all the known versions of a PURL by querying the PurlDB
and upstream package registries as needed.


Examples
########

Expand Down
9 changes: 0 additions & 9 deletions purldb-toolkit/src/purldb_toolkit/purlcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
# in seconds
POLLING_INTERVAL = 5

LOG_FILE_LOCATION = os.path.join(os.path.expanduser("~"), "purlcli.log")


@click.group()
def purlcli():
Expand Down Expand Up @@ -503,13 +501,6 @@ def check_for_duplicate_input_sources(purls, file):
raise click.UsageError("Use either purls or file.")


def clear_log_file():
log_file = Path(LOG_FILE_LOCATION)

if log_file.is_file():
os.remove(log_file)


class D2DPackage(NamedTuple):
"""
A package to use in d2d, identifier by its PURL and qualified by is package_content which is one
Expand Down
25 changes: 12 additions & 13 deletions purldb-toolkit/tests/test_purlcli_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import json
import os
from collections import OrderedDict
from unittest import mock

import pytest
from click.testing import CliRunner
Expand Down Expand Up @@ -162,9 +161,6 @@ def test_metadata_details(self):
("version", None),
("qualifiers", OrderedDict()),
("subpath", None),
("repository_homepage_url", None),
("repository_download_url", None),
("api_data_url", None),
("primary_language", None),
("description", None),
("release_date", None),
Expand All @@ -189,6 +185,9 @@ def test_metadata_details(self):
("dependencies", []),
("contains_source_code", None),
("source_packages", []),
("repository_homepage_url", None),
("repository_download_url", None),
("api_data_url", None),
]
),
OrderedDict(
Expand All @@ -200,9 +199,6 @@ def test_metadata_details(self):
("version", "0.1.0"),
("qualifiers", OrderedDict()),
("subpath", None),
("repository_homepage_url", None),
("repository_download_url", None),
("api_data_url", None),
("primary_language", None),
("description", None),
("release_date", None),
Expand Down Expand Up @@ -230,6 +226,9 @@ def test_metadata_details(self):
("dependencies", []),
("contains_source_code", None),
("source_packages", []),
("repository_homepage_url", None),
("repository_download_url", None),
("api_data_url", None),
]
),
OrderedDict(
Expand All @@ -241,9 +240,6 @@ def test_metadata_details(self):
("version", "0.2.0"),
("qualifiers", OrderedDict()),
("subpath", None),
("repository_homepage_url", None),
("repository_download_url", None),
("api_data_url", None),
("primary_language", None),
("description", None),
("release_date", None),
Expand Down Expand Up @@ -271,6 +267,9 @@ def test_metadata_details(self):
("dependencies", []),
("contains_source_code", None),
("source_packages", []),
("repository_homepage_url", None),
("repository_download_url", None),
("api_data_url", None),
]
),
OrderedDict(
Expand All @@ -282,9 +281,6 @@ def test_metadata_details(self):
("version", "0.3.0"),
("qualifiers", OrderedDict()),
("subpath", None),
("repository_homepage_url", None),
("repository_download_url", None),
("api_data_url", None),
("primary_language", None),
("description", None),
("release_date", None),
Expand Down Expand Up @@ -312,6 +308,9 @@ def test_metadata_details(self):
("dependencies", []),
("contains_source_code", None),
("source_packages", []),
("repository_homepage_url", None),
("repository_download_url", None),
("api_data_url", None),
]
),
],
Expand Down

0 comments on commit 70e5632

Please sign in to comment.