We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f94dfeb commit 43d15a8Copy full SHA for 43d15a8
1 file changed
tests/repo/test_base.py
@@ -94,6 +94,14 @@ def test_contains(self, repo):
94
with pytest.raises(TypeError):
95
assert obj in repo
96
97
+ def test_getitem(self, repo):
98
+ pkg = repo.create_pkg('cat/pkg-1')
99
+ assert pkg == repo['cat/pkg-1']
100
+
101
+ for obj in ('cat/pkg-2', Cpv('cat/pkg-3')):
102
+ with pytest.raises(KeyError):
103
+ repo[obj]
104
105
def test_len(self, repo):
106
# empty repo
107
assert len(repo) == 0
0 commit comments