def test_as_args(): config = {"caches": True, "java": True} result = process_filters(config) result.add_results() args = result.as_args() assert len(args) == 18 args = " ".join(args) assert "--exclude .m2" in args assert "--exclude .cache" in args assert "--exclude .config/*/Cache" in args assert "--exclude .config/*/GPUCache" in args assert "--exclude .config/*/CachedData" in args
def test_ignore_override_defaults(): config = {"dev-caches": True, "golang": False} result = process_filters(config) assert len(result.render().split("\n")) == 16
def test_ignore_devcaches(): config = {"dev-caches": True} result = process_filters(config) assert len(result.pluginmap) >= 6
def test_render_glob(): config = {"golang": True} result = process_filters(config) expected = "/home/*/go" assert result.render() == expected
def test_ignore_simple(): config = dict(logs=True, caches=True) result = process_filters(config) assert len(result.pluginmap) >= 2 assert result.pluginmap["caches"][0] == ".cache" assert result.pluginmap["logs"] == ("*.log", )