def test_file_scope_merge_false(tmp_path):
    """
    Similar to when using a merge_enabled=true in the toplevel of a file,
    using merge_enabled=false should prevent all structures of that scope from
    merging (with the exception of the toplevel itself), even if global
    merge_enabled=True.
    """
    # file-scope dynaconf_merge=True, merge_enabled=False
    file_a = create_file(
        tmp_path / "a.toml",
        """\
        dicty={name="foo"}
        listy=[1, 2, 3]
        """,
    )
    file_b = create_file(
        tmp_path / "b.toml",
        """\
        dynaconf_merge=true
        dicty={database_url="sqlite://"}
        listy=[9999]
        """,
    )
    settings = Dynaconf(merge_enabled=False, settings_file=[file_a, file_b])
    assert settings.dicty == {"database_url": "sqlite://", "name": "foo"}
    assert settings.listy == [1, 2, 3, 9999]

    # file-scope dynaconf_merge=False, merge_enabled=True
    file_c = create_file(
        tmp_path / "c.toml",
        """\
        dicty={name="foo"}
        listy=[1, 2, 3]
        """,
    )
    file_d = create_file(
        tmp_path / "d.toml",
        """\
        dynaconf_merge=false
        dicty={database_url="sqlite://"}
        listy=[9999]
        """,
    )
    settings = Dynaconf(merge_enabled=True, settings_file=[file_c, file_d])
    assert settings.dicty == {"database_url": "sqlite://"}
    assert settings.listy == [9999]

    Similar to when using a merge_enabled=true in the toplevel of a file,
    using merge_enabled=false should prevent all structures of that scope from
    merging (with the exception of the toplevel itself), even if global
    merge_enabled=True.
    
tests_functional/issues/835_926_enable-merge-equal-false/app_test.py