How to use the colin.get_checks function in colin

To help you get started, we’ve selected a few colin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github user-cont / colin / tests / integration / test_ruleset_file.py View on Github external
def test_get_checks_directly(ruleset):
    checks = colin.get_checks(ruleset=ruleset)
    assert checks
github user-cont / colin / tests / integration / test_ruleset_file.py View on Github external
def test_unknown_check(ruleset_unknown_check):
    with pytest.raises(ColinRulesetException) as ex:
        colin.get_checks(ruleset=ruleset_unknown_check)
    assert str(ex.value) == "Check i_forgot_the_name can't be loaded, we couldn't find it."
github user-cont / colin / tests / integration / test_ruleset_file.py View on Github external
def test_coupled_ruleset(ruleset_coupled):
    checks = colin.get_checks(ruleset=ruleset_coupled)
    assert checks
    assert len(checks) == 3
    for c in checks:
        assert "required" in c.tags
github user-cont / colin / tests / integration / test_ruleset_file.py View on Github external
def test_skip(ruleset):
    checks = colin.get_checks(ruleset=ruleset, skips=["name_label", "help_label"])
    assert len(checks) == 2
    for check in checks:
        assert check.name in ["com.redhat.component_label", "maintainer_label"]