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