Skip to content

Commit

Permalink
Fix: ebuild tests
Browse files Browse the repository at this point in the history
Remove a wrong line from the example list for gentoo and fix the test to run over the whole file
  • Loading branch information
jjnicola committed Nov 1, 2023
1 parent 90de61e commit 8144be3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion tests/models/packages/gentoo_examples.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27989,7 +27989,6 @@ net-analyzer/squidview-0.86
net-analyzer/nethogs-0.8.6-r1
net-analyzer/sshping-0.1.4
net-analyzer/nfdump-1.6.23
/mnt/gentoo/var/db/repos/gentoo/skel.ebuild
sec-policy/selinux-gatekeeper-2.20210203-r1
sec-policy/selinux-gatekeeper-2.20210908-r1
sec-policy/selinux-gatekeeper-9999
Expand Down
6 changes: 3 additions & 3 deletions tests/models/packages/test_ebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ def test_parse_fullname(self):
with (currentp / "gentoo_examples.txt").open(
"r", encoding="utf-8"
) as file:
fullname = file.readline()
if not EBuildPackage.from_full_name(fullname):
self.fail(f"{fullname} is not parsable for EBuildPackage.")
for fullname in file.readlines():
if not EBuildPackage.from_full_name(fullname):
self.fail(f"{fullname} is not parsable for EBuildPackage.")

def test_guard(self):
self.assertIsNone(EBuildPackage.from_full_name(""))
Expand Down

0 comments on commit 8144be3

Please sign in to comment.