def test_extended_config_invalid_key():
    """Test that accessing a non-existent key via attribute access raises AttributeError."""
    data = {'existing': 'yes'}
    ext_cfg = ExtendedConfig.from_dict(data)

    with pytest.raises(AttributeError):
        _ = ext_cfg.nonexistent

    with pytest.raises(KeyError):
        _ = ext_cfg['nonexistent']
Test that accessing a non-existent key via attribute access raises AttributeError.
tests/unit/test_config_extended.py