Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/t/test_chown.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)
)
class TestChown:
@pytest.mark.xfail(
@pytest.mark.skipif(
getpass.getuser() != "root", reason="Only root can chown to all users"
)
@pytest.mark.complete("chown ")
Expand Down
4 changes: 2 additions & 2 deletions test/t/test_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TestDict:
def test_1(self, completion):
assert completion

@pytest.mark.xfail(
@pytest.mark.skipif(
os.environ.get("NETWORK") == "none",
reason="The database list is unavailable without network",
)
Expand All @@ -20,7 +20,7 @@ def test_database(self, completion):
# completions.
assert completion and "_comp_load/" not in completion

@pytest.mark.xfail(
@pytest.mark.skipif(
os.environ.get("NETWORK") == "none",
reason="The database list is unavailable without network",
)
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_dpkg_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestDpkgQuery:
def test_options(self, completion):
assert completion

@pytest.mark.xfail(
@pytest.mark.skipif(
not os.path.exists("/etc/debian_version"),
reason="Likely fails on systems not based on Debian",
)
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_ether_wake.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@pytest.mark.bashcomp(cmd="ether-wake")
class TestEtherWake:
@pytest.mark.xfail(
@pytest.mark.skipif(
os.environ.get("NETWORK") == "none",
reason="MAC addresses may be N/A with no networking configured",
)
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_gkrellm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest


@pytest.mark.xfail(not os.environ.get("DISPLAY"), reason="X display required")
@pytest.mark.skipif(not os.environ.get("DISPLAY"), reason="X display required")
class TestGkrellm:
@pytest.mark.complete("gkrellm -", require_cmd=True)
def test_1(self, completion):
Expand Down
4 changes: 2 additions & 2 deletions test/t/test_ifdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@


class TestIfdown:
@pytest.mark.xfail(
@pytest.mark.skipif(
os.environ.get("NETWORK") == "none",
reason="There won't be any configured interfaces without network",
)
@pytest.mark.xfail(in_container(), reason="Probably fails in a container")
@pytest.mark.skipif(in_container(), reason="Probably fails in a container")
@pytest.mark.complete("ifdown ", require_cmd=True)
def test_1(self, completion):
assert completion
Expand Down
4 changes: 2 additions & 2 deletions test/t/test_ifup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@


class TestIfup:
@pytest.mark.xfail(
@pytest.mark.skipif(
os.environ.get("NETWORK") == "none",
reason="There won't be any configured interfaces without network",
)
@pytest.mark.xfail(in_container(), reason="Probably fails in a container")
@pytest.mark.skipif(in_container(), reason="Probably fails in a container")
@pytest.mark.complete("ifup ", require_cmd=True)
def test_1(self, completion):
assert completion
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_invoke_rc_d.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@pytest.mark.bashcomp(cmd="invoke-rc.d")
class TestInvokeRcD:
@pytest.mark.xfail(
@pytest.mark.skipif(
sys.platform == "darwin",
reason="Service completion not available on macOS",
)
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_postfix.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TestPostfix:
def test_1(self, completion):
assert completion

@pytest.mark.xfail(
@pytest.mark.skipif(
getpass.getuser() != "root",
reason="Likely outputs usage only for root",
)
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class TestService:
@pytest.mark.xfail(
@pytest.mark.skipif(
sys.platform == "darwin",
reason="Service completion not available on macOS",
)
Expand Down
2 changes: 1 addition & 1 deletion test/t/unit/test_unit_compgen_ip_addresses.py
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just commenting on a random file, not related to this one:

WIP/draft for initial comments because this only addresses pytest.mark.xfail/skipif for now, not yet our pytest.mark.complete skipif=/xfail= (there's a lot of that in the tree).

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_3(self, functions, completion):
assert completion
assert all("." in x for x in completion)

@pytest.mark.xfail(in_container(), reason="Probably fails in a container")
@pytest.mark.skipif(in_container(), reason="Probably fails in a container")
@pytest.mark.complete("ia6 ")
def test_4(self, functions, completion):
"""_comp_compgen_ip_addresses -6 should complete ipv6 addresses."""
Expand Down
Loading