def test_rule_linenumber(monkeypatch) -> None: """Check that SudoRule offense contains a line number.""" rule = SudoRule() lintable = Lintable("", kind="tasks", content=TEST_TASKLIST) matches = rule.matchyaml(lintable) assert matches[0].linenumber == 5
def test_rule_linenumber(monkeypatch): """Check that SudoRule offense contains a line number.""" rule = SudoRule() matches = rule.matchyaml(dict(path="", type='tasklist'), TEST_TASKLIST) assert matches[0].linenumber == 5