def test_inspect_env_filter(tmp_path):
    """
    Caveat: env filter will show current default env values too.
            History will be filtered properly.
    """
    filename = create_file(
        tmp_path / "a.toml",
        """\
        default.foo="from_env_default"
        development.foo="from_env_dev"
        prod.bar="prod_only"
        """,
    )

    settings = Dynaconf(settings_file=filename, environments=True)
    result = inspect_settings(settings, dumper="yaml", env="prod")
    assert result["header"]["env_filter"] == "prod"
    assert result["header"]["key_filter"] == "None"
    assert result["current"] == {"FOO": "from_env_default", "BAR": "prod_only"}
    assert result["history"] == [
        {
            "loader": "toml",
            "identifier": str(filename),
            "env": "prod",
            "merged": False,
            "value": {"BAR": "prod_only"},
        }
    ]

    Caveat: env filter will show current default env values too.
            History will be filtered properly.
    
tests/test_inspect.py