Exemple #1
0
class Base:
    name = C.get_rule_name(__file__)
    rule = C.get_rule_instance_by_name(TT, name)
    clear_fn = TT.max_lines.cache_clear
class Base:
    name = C.get_rule_name(__file__)
    rule = C.get_rule_instance_by_name(TT, name)
    clear_fn = TT.is_yml_file_has_some_data.cache_clear
class Base:
    name = C.get_rule_name(__file__)
    rule = C.get_rule_instance_by_name(TT, name)
class Base:
    name = C.get_rule_name(__file__)
    rule = C.get_rule_instance_by_name(TT, name)
    clear_fn = TT.task_name_re.cache_clear
def test_list_resoruces_for_ng_cases(success, search):
    name = C.get_rule_name()
    with pytest.raises(RuntimeError, match=r"No resource data files:.*"):
        C.list_resources(name, success=success, search=search)
def test_list_resoruces_for_ok_cases(success, search):
    name = C.get_rule_name()
    rss = C.list_resources(name, success=success, search=search)
    assert rss
    assert C.pathlib.Path(rss[0]).name == 'ok_1.yml'
def test_get_rule_name():
    assert C.get_rule_name() == 'common'
class Base:
    name = C.get_rule_name(__file__)
    rule = C.get_rule_instance_by_name(TT, name)
    clear_fn = TT.is_enabled.cache_clear
class Base:
    name = C.get_rule_name(__file__)
    rule = C.get_rule_instance_by_name(TT, name)
    clear_fn = TT.blacklisted_modules.cache_clear