Skip to content

Commit

Permalink
tests: add Dep object targets for repo class __getitem__() indexing
Browse files Browse the repository at this point in the history
radhermit committed Jun 20, 2024
1 parent 5b21faf commit 50a3b8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/repo/base.py
Original file line number Diff line number Diff line change
@@ -110,8 +110,10 @@ def test_getitem_base(self, repo):
pkg = repo.create_pkg("cat/pkg-1")
assert pkg == repo["cat/pkg-1"]
assert pkg == repo[Cpv("cat/pkg-1")]
assert pkg == repo[Dep("=cat/pkg-1")]
assert pkg == repo[Dep(">=cat/pkg-1")]

for obj in ("cat/pkg-2", Cpv("cat/pkg-3")):
for obj in ("cat/pkg-2", Cpv("cat/pkg-3"), Dep("<cat/pkg-1")):
with pytest.raises(KeyError):
_ = repo[obj]

0 comments on commit 50a3b8a

Please sign in to comment.