summaryrefslogtreecommitdiffstats
path: root/test/t/test_nproc.py
blob: 66a49acba629bb85db5fa72a2b494b73e7f97e13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import pytest


class TestNproc:
    @pytest.mark.complete("nproc ")
    def test_1(self, completion):
        assert not completion

    @pytest.mark.complete(
        "nproc --",
        xfail=(
            "! nproc --help &>/dev/null || "
            "! nproc --help 2>&1 | command grep -qF -- --help"
        ),
    )
    def test_2(self, completion):
        assert completion