def METHOD_NAME(tmp_path, write_policy):
    dir_loader = loader.DirectoryLoader(Config.empty())
    write_policy(
        "policy1.yaml",
        {"policies": [{"name": "good", "resource": "s3"}]},
    )
    # hidden folders should not be traversed
    write_policy(
        os.path.join(".hidden-dir", "policy2.yaml"),
        {'policies': [{"name": "three", "resource": "s3"}]},
    )
    # hidden sub folders should not be traversed
    write_policy(
        os.path.join(".hidden-dir", "policy2.yaml"),
        {'policies': [{"name": "three", "resource": "s3"}]},
    )
    policies = dir_loader.load_directory(tmp_path)
    assert len(policies.policies) == 1
    policy, = policies.policies
    assert policy.name == "good"