From 11f283423abea10e3cc5ac062491ccc0760feadb Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Fri, 24 Oct 2025 13:58:24 -0700 Subject: [PATCH 1/2] Create helper method to handle test map deletion Signed-off-by: Jono Yang --- tests/test_purl_validator.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/test_purl_validator.py b/tests/test_purl_validator.py index 844c26a..00c19c0 100644 --- a/tests/test_purl_validator.py +++ b/tests/test_purl_validator.py @@ -34,6 +34,11 @@ def tearDown(self): fileutils.delete(purl_map.parent) return super().tearDown() + def create_purl_map(self, purls): + purl_map_loc = purl_validator.create_purl_map(purls) + self.created_purl_maps.append(purl_map_loc) + return purl_map_loc + def test_purl_validator_create_purl_map_entry(self): test_purl1 = PackageURL(type="npm", namespace="@test", name="test", version="1.0") test_purl2 = "pkg:npm/test2@2.0" @@ -56,16 +61,14 @@ def test_purl_validator_create_purl_map_entry(self): test_purl4 = [] purls = [test_purl1, test_purl2] - purl_map_loc = purl_validator.create_purl_map(purls) - self.created_purl_maps.append(purl_map_loc) - + purl_map_loc = self.create_purl_map(purls) purl_map = purl_validator.PurlValidator.load_map(purl_map_loc) expected_results = [(b"npm/@test/test", 1), (b"npm/test2", 1)] results = [(k, v) for k, v in purl_map.items()] self.assertEqual(expected_results, results) with self.assertRaises(ValueError): - purl_validator.create_purl_map([test_purl3]) + self.create_purl_map([test_purl3]) with self.assertRaises(ValueError): - purl_validator.create_purl_map([test_purl4]) + self.create_purl_map([test_purl4]) From e097b5dd0a478166543896eb92d097ab6844ad36 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Fri, 24 Oct 2025 14:01:56 -0700 Subject: [PATCH 2/2] Update requirements-dev.txt Signed-off-by: Jono Yang --- requirements-dev.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 9092c81..7217fe4 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,6 +2,7 @@ aboutcode-toolkit==11.1.1 alabaster==1.0.0 anyio==4.11.0 babel==2.17.0 +backports.tarfile==1.2.0 boolean.py==5.0 cffi==2.0.0 colorama==0.4.6 @@ -9,10 +10,12 @@ cryptography==46.0.3 doc8==2.0.0 docutils==0.21.2 et_xmlfile==2.0.0 +exceptiongroup==1.3.0 execnet==2.1.1 h11==0.16.0 id==1.5.0 imagesize==1.4.1 +importlib_metadata==8.7.0 iniconfig==2.3.0 jaraco.classes==3.4.0 jaraco.context==6.0.1 @@ -39,17 +42,16 @@ requests-toolbelt==1.0.0 restructuredtext_lint==1.4.0 rfc3986==2.0.0 rich==14.2.0 -roman-numerals-py==3.1.0 ruff==0.14.2 secretstorage==3.4.0 sniffio==1.3.1 snowballstemmer==3.0.1 -sphinx==8.2.3 -sphinx-autobuild==2025.8.25 +sphinx==8.1.3 +sphinx-autobuild==2024.10.3 sphinx-copybutton==0.5.2 -sphinx-reredirects==1.0.0 sphinx-rtd-dark-mode==1.3.0 sphinx-rtd-theme==3.0.2 +sphinx_reredirects==0.1.6 sphinxcontrib-applehelp==2.0.0 sphinxcontrib-devhelp==2.0.0 sphinxcontrib-htmlhelp==2.1.0 @@ -59,7 +61,9 @@ sphinxcontrib-qthelp==2.0.0 sphinxcontrib-serializinghtml==2.0.0 starlette==0.48.0 stevedore==5.5.0 +tomli==2.3.0 twine==6.2.0 uvicorn==0.38.0 watchfiles==1.1.1 -websockets==15.0.1 \ No newline at end of file +websockets==15.0.1 +zipp==3.23.0 \ No newline at end of file