summaryrefslogtreecommitdiffstats
path: root/test/t/test_kldunload.py
blob: a52c99ebb1d74de37a3fae8bed003e24b952819f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import subprocess

import pytest


class TestKldunload:
    @pytest.mark.complete("kldunload ")
    def test_1(self, completion):
        try:
            subprocess.check_call(
                r"kldstat 2>/dev/null | command grep -q '\.ko$'", shell=True
            )
        except BaseException:
            assert not completion
        else:
            assert completion