Skip to content

Commit 5caa2bc

Browse files
committed
test(dpkg-query): xfail if apt-cache show fails
For example with an empty cache it does.
1 parent 8729f53 commit 5caa2bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/t/test_dpkg_query.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ def test_options(self, completion):
1313
not os.path.exists("/etc/debian_version"),
1414
reason="Likely fails on systems not based on Debian",
1515
)
16-
@pytest.mark.complete("dpkg-query -W dpk", require_cmd=True)
16+
@pytest.mark.complete(
17+
"dpkg-query -W dpk",
18+
require_cmd=True,
19+
xfail="! apt-cache show &>/dev/null", # empty cache?
20+
)
1721
def test_show(self, completion):
1822
assert "dpkg" in completion

0 commit comments

Comments
 (0)