Skip to content

Commit 50a3b8a

Browse files
committed
tests: add Dep object targets for repo class __getitem__() indexing
1 parent 5b21faf commit 50a3b8a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/repo/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ def test_getitem_base(self, repo):
110110
pkg = repo.create_pkg("cat/pkg-1")
111111
assert pkg == repo["cat/pkg-1"]
112112
assert pkg == repo[Cpv("cat/pkg-1")]
113+
assert pkg == repo[Dep("=cat/pkg-1")]
114+
assert pkg == repo[Dep(">=cat/pkg-1")]
113115

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

0 commit comments

Comments
 (0)